-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UID is used for chown as GID #863
Comments
if you just a regular user it's just enough to set DynamicUsers to never, as it described in the warning message, or just ignoring the message until this became migrated automatically when feature get fully removed. creating user is an extra step for people who would like to "simulate" that behavior of having separate user for aur builds regarding the reported issue itself, indeed right now pikaur is using UID for setting both uid and gid of the directory, that should be fixed |
Thanks for reporting! |
Thanks for a fast reply!
For some reason (perhaps it was phrasing of the warning, perhaps I just misunderstood), I was under the impression that this step had to be accompanied by configuring a non-trivial UserId. I can confirm that changing DynamicUsers to 'never' and leaving UserId at 0 is a sufficient response to the warning.
I see. I don't need that. Thanks again! |
but does your scenario with custom user gid works now? |
Well, thanks to your patch I can now set the proper gid for the chown operation. ...but the main issue still remains -- pikaur runs chown needlessly because the target path already has the correct permissions, and when it does so, it carries out the command in non-escalated mode, resulting in EPERM. For completeness I should note that I do not really need to use this feature. I merely overreacted when I saw pikaur's warning following the recent deprecation of DynamicUsers. Setting that parameter to 'never' is an acceptable solution for me. |
but aside of writing the error the process itself works as expected? i think i just need to change it to the warning |
[Optional] Prerequisites:
N/A
Description:
Following recent deprecation of DynamicUsers, I implemented steps described as 'solution 2' in this post, which I understand to be the proper way of addressing this change.
useradd --system --home-dir="/" --shell="/usr/bin/nologin" --comment="Pikaur Package Management" ppm
/var/cache/ppm
owned by ppm:ppm.chown -R ppm:ppm /var/cache/ppm
~/.config/pikaur.conf
to the following settings (everything else is untouched since I first installed pikaur years ago)At the next run of pikaur, I found that the program attempted to change ownership of
/var/cache/ppm
to 617/617 and complained that:For due diligence, I also managed to confirm this using strace:
There are 3 issues with this in my opinion:
audit
group, notppm
. Unfortunately both values passed to chown appear to be configured to UserId and I could not find any GroupId parameter that would allow me to override the latter value.Since deprecation of dynamic users is a little bit mysterious to me, I tried to do my due diligence as a responsible user and locate any mentions of it in documentation or release notes to determine the proper course of action. To my disappointment, with the exception of README sections documenting DynamicUsers and UserId configuration parameters, this commit and this issue, there was very little information to go on. This left me a little bit in the dark.
For that reason I would like to take this opportunity to ask for clarification/advice:
Thank you for any information you can share!
Attached log:
The text was updated successfully, but these errors were encountered: