Hi ,
I know that the question is allready in topic but , I changed the howner of the file, and it doesn’t change anything :
stat /var/lib/centreon/centplugins/cache_snmpstandard_10.180.64.253_161_interfaces
Size: 2129 Blocks: 8 IO Block: 4096 regular file
Device: fd02h/64770d Inode: 13432329 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2023-08-23 11:29:41.963775378 +0200
Modify: 2023-08-23 11:29:41.962775378 +0200
Change: 2023-08-23 11:29:41.962775378 +0200
Birth: 2023-06-23 13:00:10.271024300 +0200
So I changed howner (and group)
chown centreon-engine:centreon-engine /var/lib/centreon/centplugins/cache_snmpstandard_10.180.64.253_161_interfaces
Then stat
stat /var/lib/centreon/centplugins/cache_snmpstandard_10.180.64.253_161_interfaces
File: /var/lib/centreon/centplugins/cache_snmpstandard_10.180.64.253_161_interfaces
Size: 2129 Blocks: 8 IO Block: 4096 regular file
Device: fd02h/64770d Inode: 13440314 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 991/centreon-engine) Gid: ( 988/centreon-engine)
Access: 2023-08-31 09:48:43.736652070 +0200
Modify: 2023-08-31 09:48:38.259652422 +0200
Change: 2023-08-31 09:48:38.259652422 +0200
Birth: 2023-08-31 09:48:38.259652422 +0200
Then change user :
su centreon-engine
bash-4.4$ /usr/lib/centreon/plugins//centreon_cisco_standard_snmp.pl --plugin=network::cisco::standard::snmp::plugin
And finally =>
UNKNOWN: Cannot write statefile '/var/lib/centreon/centplugins/snmpstandard_10.180.64.253_161_interfaces_a181a603769c1f98ad927e7367c7aa51_4fd4a56c435d5c26b3c3c366f51b074e_5a1e5f7836ebffa35ded40cf7acb2b4a'. Need write permissions on file.
But =>
stat /var/lib/centreon/centplugins/cache_snmpstandard_10.180.64.253_161_interfaces
File: /var/lib/centreon/centplugins/cache_snmpstandard_10.180.64.253_161_interfaces
Size: 2129 Blocks: 8 IO Block: 4096 regular file
Device: fd02h/64770d Inode: 13440314 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 991/centreon-engine) Gid: ( 988/centreon-engine)
Access: 2023-08-31 10:03:44.449594063 +0200
Modify: 2023-08-31 10:03:37.482594512 +0200
Change: 2023-08-31 10:03:37.482594512 +0200
Birth: 2023-08-31 10:03:37.482594512 +0200
Do I have change the howner on the directory ?