Export configuration permission error


Userlevel 1
Badge +11

Another big issue, permission errors while generating the files in /var/cache/centreon and also in /etc/centreon-engine.

 

Step to reproduce:

  • fresh install
  • create random command, random service or template.
  • Export configuration (generate only) you will find the permission error on /var/cache/centreon…
  • Export (move option), you will see the error on /etc/centreon-engine issue

Workaround, chown centreon-engine on all the above files and chmod 664 on /etc/centreon-engine folder

 

I am really wondering which kind of Agile method is being used for this development

Laurent 1 year ago

We have a ticket for this in backlog and we are working on it. Stay tuned

View original

12 replies

Userlevel 1
Badge +11

​​​​​​

 

Userlevel 5
Badge +11

Hi @coco163, It's being resolved, we'll let you know as soon as there's news.
Thanks for reporting this

Userlevel 6
Badge +18

Hi @coco163 which version of Centreon do you used?

we never have encountered this problem.

Userlevel 1
Badge +11

22.04 Debian

Userlevel 6
Badge +18

I have this for rights:

# ls -lah /var/cache/centreon/config/*/
/var/cache/centreon/config/broker/:
total 8.0K
drwxrwxr-x 2 centreon centreon 4.0K Aug 12 14:58 .
drwxrwxr-x 5 centreon centreon 4.0K Aug 29 12:58 ..

/var/cache/centreon/config/engine/:
total 8.0K
drwxrwxr-x 2 centreon centreon 4.0K Aug 12 14:58 .
drwxrwxr-x 5 centreon centreon 4.0K Aug 29 12:58 ..

/var/cache/centreon/config/export/:
total 8.0K
drwxrwxr-x 2 centreon centreon 4.0K Aug 12 14:58 .
drwxrwxr-x 5 centreon centreon 4.0K Aug 29 12:58 ..

Do you export configuration from CLAPI?

Userlevel 1
Badge +11

I am generating conf via clapi using the user centreon.

That’s why i have the subfolder “1” but permissions are assigned to root:root

Userlevel 6
Badge +18

Using bash ‘root’ user and generating configuration for poller 1 with:

/usr/share/centreon/bin/centreon -u admin -p centreon -a POLLERGENERATE -v 1

Generated files are linked to “apache” user on “CentOS 7”:

ls -lah /var/cache/centreon/config/engine/1/
total 112K
drwxrwx--- 2 apache apache 4.0K Sep 2 10:02 .
drwxrwsr-x 6 centreon centreon 42 Sep 2 10:02 ..
-rw-rw---- 1 apache apache 3.8K Sep 2 10:02 centengine.cfg
-rw-rw---- 1 apache apache 4.1K Sep 2 10:02 centengine.DEBUG
-rw-rw---- 1 apache apache 4.6K Sep 2 10:02 commands.cfg
-rw-rw---- 1 apache apache 1.4K Sep 2 10:02 connectors.cfg
-rw-rw---- 1 apache apache 1.1K Sep 2 10:02 contactgroups.cfg
-rw-rw---- 1 apache apache 1.1K Sep 2 10:02 contacts.cfg
-rw-rw---- 1 apache apache 1.1K Sep 2 10:02 dependencies.cfg
-rw-rw---- 1 apache apache 1.1K Sep 2 10:02 escalations.cfg
-rw-rw---- 1 apache apache 1.1K Sep 2 10:02 hostgroups.cfg
-rw-rw---- 1 apache apache 1.4K Sep 2 10:02 hosts.cfg
-rw-rw---- 1 apache apache 3.4K Sep 2 10:02 hostTemplates.cfg
-rw-rw---- 1 apache apache 1.1K Sep 2 10:02 meta_commands.cfg
-rw-rw---- 1 apache apache 1.1K Sep 2 10:02 meta_host.cfg
-rw-rw---- 1 apache apache 1.1K Sep 2 10:02 meta_services.cfg

Did you have a PHP error during files generation? (about chown/chmod)?

Userlevel 1
Badge +11

Pas de CentOS ici.

Et oui, warning chmod

Userlevel 6
Badge +18

We have a ticket for this in backlog and we are working on it. Stay tuned

Userlevel 1
Badge +11

Toujours rien?

(Debian) CLAPI - permission error · Issue #11738 · centreon/centreon (github.com)

Userlevel 6
Badge +18

Hi @coco163 did you made new installation? I din’t encounter this problem on latest fresh installation.

For update, I’m not sure that rights will be corrected.

Userlevel 1
Badge +11

Problem still remains on version 22.04.7.

For info, all my configuration is pushed through clapi using user centreon

Reply