Installation: access rights of /var/lib/pulp

Problem: After installation /var/lib/pulp is not set to pulp:pulp

Expected outcome: directory is set to pulp:pulp

Foreman, Katello and Puppet versions: 3.9, 4.11 and 7

Distribution and version: RedHat 8

We are working on a script, which will configure a freshly installed VM for the mostly automated installation of a Foreman with Katello and a handful of plugins. We set a hostname, build volume groups and logical volumes and also mount /var/lib/pgsql and /var/lib/pulp.
The script runs through and we do have a running Foreman and can login. However, when we try to create content with repositories a sync hangs forever as /var/lib/pulp is set to root:root and not pulp:pulp.

We’ve expected that the installer script detects the /var/lib/pulp directory and then set the access rights, but it seems that this is not the case. The installer adds the user pulp anyway.

How do we correct this?

With regards.

I just looked it up and the installer should set the permissions just as you described.
So I would guess you either have an ordering problem (like running the installer before mounting /var/lib/pulp) or you are missing/misconfiguring some options for the installer.

1 Like

Hi areyus,

thanks for your answer, we’ve installed a new Foreman yesterday and it did changed the ownership correctly:

2024-03-06 14:37:36 [INFO ] [configure] /Stage[main]/Pulpcore::Config/File[/var/lib/pulp]/owner: owner changed ‘root’ to ‘pulp’
2024-03-06 14:37:36 [INFO ] [configure] /Stage[main]/Pulpcore::Config/File[/var/lib/pulp]/group: group changed ‘root’ to ‘pulp’
2024-03-06 14:37:36 [INFO ] [configure] /Stage[main]/Pulpcore::Config/File[/var/lib/pulp]/mode: mode changed ‘0755’ to ‘0775’
2024-03-06 14:37:36 [INFO ] [configure] /File[/var/lib/pulp]/seluser: seluser changed ‘unconfined_u’ to ‘system_u’
2024-03-06 14:37:36 [INFO ] [configure] /File[/var/lib/pulp]/seltype: seltype changed ‘var_lib_t’ to ‘pulpcore_var_lib_t’

But somehow later after the installation, the directory was set back to root:root and we don’t know why and I can’t find in the logs under foreman-installer/katello*.logs
We’ve set it manually back to pulp:pulp and run the installer again.

With regards!