Issue #7653
closedPulp2 overrides permissions set by pulp3
Description
Imagine you have pulp2 and some data( in this case i had only ISO content), then pulp3 gets installed. Write permission for the pulp group is granted and setgid is set [0] Issue comes when new content gets synced into pulp2( in this case I synced an rpm repo) .Pulp2 overrides permissions, this makes is impossible to create a hardlink
$ ll /var/lib/pulp/content/units/
total 12
drwxrwsr-x. 173 apache pulp 4096 Sep 2 08:34 iso <------------------ existing content by the time pulp3 installed
drwxr-sr-x. 12 apache pulp 106 Sep 2 08:35 modulemd <---------------------- new content after pulp3 installed
drwxr-sr-x. 5 apache pulp 36 Sep 2 08:35 modulemd_defaults
drwxr-sr-x. 35 apache pulp 4096 Sep 2 08:35 rpm
(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 ~
$ ll /var/lib/pulp/content/units/modulemd
total 0
drwxr-sr-x. 2 apache pulp 76 Sep 2 08:35 00
drwxr-sr-x. 2 apache pulp 76 Sep 2 08:35 04
drwxr-sr-x. 2 apache pulp 76 Sep 2 08:35 1b
drwxr-sr-x. 2 apache pulp 76 Sep 2 08:35 41
drwxr-sr-x. 2 apache pulp 76 Sep 2 08:35 66
drwxr-sr-x. 2 apache pulp 76 Sep 2 08:35 78
drwxr-sr-x. 2 apache pulp 76 Sep 2 08:35 8a
drwxr-sr-x. 2 apache pulp 76 Sep 2 08:35 90
drwxr-sr-x. 2 apache pulp 76 Sep 2 08:35 a8
drwxr-sr-x. 2 apache pulp 76 Sep 2 08:35 ea
Then i synced a new ISO repo.
$ ll /var//lib//pulp/content/units/iso/12
total 0
drwxr-sr-x. 2 apache pulp 19 Sep 2 08:33 3f7c65dc3598a59bbb867425c4e52cc54ecb66ff0f6db4656d349799b96594
(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 ~]$ ll /var//lib//pulp/content/units/iso/12/3f7c65dc3598a59bbb867425c4e52cc54ecb66ff0f6db4656d349799b96594/
All the content that appears after pulp3 is installed, does not have write permission for the pulp group. This makes it impossible to create hard link during the migration https://pulp.plan.io/issues/7244
[0] https://github.com/pulp/pulp_installer/blob/master/roles/pulp_common/tasks/install.yml#L107-L133
Related issues
Updated by ggainey about 4 years ago
- Copied from Issue #7445: Pulp2 overrides permissions set by pulp3 added
Updated by pulpbot about 4 years ago
- Status changed from ASSIGNED to POST
Added by ggainey about 4 years ago
Updated by ggainey about 4 years ago
- Status changed from POST to MODIFIED
Applied in changeset 234c39985d86ff5e7020e4bde50d79b721547ecc.
Added by ggainey about 4 years ago
Revision 8a70b538 | View on GitHub
Insure that makedirs() results in directories group can write to.
Tracked down a lot of makedirs() calls and replaced them with misc.mkdir()
Note: required-PR is needed to fix the permission problem, but the code will build/work without it.
fixes #7653 Required PR: https://github.com/pulp/pulp/pull/4000
(cherry picked from commit 234c39985d86ff5e7020e4bde50d79b721547ecc)
Updated by ggainey about 4 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Insure that makedirs() results in directories group can write to.
Tracked down a lot of makedirs() calls and replaced them with misc.mkdir()
Note: required-PR is needed to fix the permission problem, but the code will build/work without it.
fixes #7653 Required PR: https://github.com/pulp/pulp/pull/4000