UNKNOWN: Cannot write statefile '/var/lib/centreon/centplugins/cache_snmpstandard_10.0.0.19_161_storage

  • 31 March 2022
  • 1 reply
  • 1637 views

Userlevel 1
Badge +5

Hi !

The documentation explains that you have to test the rights of the /var/lib/centreon/centplugins folder to see if they are correct and I have a somewhat different result : 

expected result for stat /var/lib/centreon/centplugins command : 

File: '/var/lib/centreon/centplugins'
[...]
Access: (0775/drwxrwxr-x) Uid: ( 998/centreon) Gid: ( 997/centreon)`
[...]

my result for stat /var/lib/centreon/centplugins command : 

File: '/var/lib/centreon/centplugins'
[...]
Access: (0775/drwxrwxr-x) UID : ( 998/centreon) GID : ( 998/centreon)
[...]


 

expected result for stat /var/lib/centreon/centplugins/cache_snmpstandard_10.0.0.19_161_storage command :
File: '/var/lib/centreon/centplugins/cache_snmpstandard_10.0.0.19_161_storage'
[...]
Access: (0664/-rw-rw-r--) Uid: ( 994/centreon-engine) Gid: ( 991/centreon-engine)
[...]
my result for stat /var/lib/centreon/centplugins/cache_snmpstandard_10.0.0.19_161_storage command :
File: '/var/lib/centreon/centplugins/<cache_file_name>'
[...]
Access: (0644/-rw-r--r--) UID : ( 0/ root) GID : ( 0/ root)
[...]
What is your opinion ?

1 reply

Userlevel 3
Badge +9

Hello @Intence-Tech,

It means that the related command for the cache file was executed by the root user. You need to use the centreon-engine user when you test a Centreon plugin. You can safely remove this file or change its rights if the centreon-engine user need to modifiy it.

 

Regards.

Reply