Multiple user permissions on a directory
Hello,
I changed the docker storage to another location: Code:
{ Code:
# ls -l /mnt/newlocation/ Code:
# chown -R gitlab-runner /mnt/newlocation/ Code:
# ls -l /mnt/newlocation/ I found solutions on the internet that were about creating a group, then adding users to that group, and finally giving that group full permission for that directory. Is this OK? Thank you. |
Yes, this would be the correct solution, versus changing the "owner." I recommend that you [immediately ...] change the owner back, define a group, add "gitlab-runner" to that group, and change the group of that directory and its contents appropriately. Assign the desired permissions to the group.
FYI: There is also an entirely-parallel permissions system known as ACLs = Access Control Lists. Which are much more flexible, and which can coexist. I encourage you to research this option also. |
Quote:
Thank you so much for your reply. So I create a group and add the root and gitlab-runner users to it and then give permission to this group for that directory. I did: Code:
# chown -R root data/ Code:
# ls -l |
Hello,
I have a problem. When I ran the runner, I got the following error message: Code:
$ rm -rf /mnt/data/containers/ |
/mnt and /mnt/data/ must have an x bit (access) set, otherwise all access is denied.
/mnt/data/containers/ looks ok, gives write access for the group members. (Note that a modified group is recognized at the next login.) A remaining problem is that a directory created by one user is not writable by the other, unless the one user does a chgrp and chmod. The traditional fix is
Regarding the ACL alternative, I posted a solution that worked in Linux and Solaris https://community.unix.com/t/tip-gro...rectory/383754 |
All times are GMT -5. The time now is 02:07 PM. |