Mike Leone via plug on 3 Jan 2025 12:12:11 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Setting proper user and group permissions on a directory


On Thu, Jan 2, 2025 at 3:00 PM Mike Leone <turgon@mike-leone.com> wrote:
 $ setfacl -d --set g:TitleCompanies:rwx /TitleDocuments/
setfacl: /TitleDocuments: Operation not supported

$ cat /etc/fstab
/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0

So I followed this:
https://www.ucartz.com/clients/knowledgebase/1485/Solution-for-setfacl-Operation-not-supported-in-Linux-Servers.html

and issued this:
tune2fs -o acl  /dev/VolGroup00/LogVol00

Looks like it worked?

[root@phaserv1:~] $ tune2fs -l /dev/VolGroup00/LogVol00 | grep 'mount option'
Default mount options:    acl
[root@phaserv1:~] $

Then, just to be extra sure, I rebooted. (you're supposed to just re-mount, but I figured why not, it hadn't been rebooted in a number of months ...)

Looks like the change took ...

[root@phaserv1:~] $ tune2fs -l /dev/VolGroup00/LogVol00 | grep 'mount option'
Default mount options:    acl
[root@phaserv1:~] $

[root@phaserv1:/TitleDocuments] $ mkdir TestDir
[root@phaserv1:/TitleDocuments] $ setfacl -d --set=g:TitleCompanies:rwx /TitleDocuments/TestDir
[root@phaserv1:/TitleDocuments] $ cd TestDir/
[root@phaserv1:/TitleDocuments/TestDir] $ mkdir TestDir2
[root@phaserv1:/TitleDocuments/TestDir] $ getfacl TestDir2
# file: TestDir2
# owner: root
# group: root
user::rwx
group::r-x
group:TitleCompanies:rwx
mask::rwx
other::r-x
default:user::rwx
default:group::r-x
default:group:TitleCompanies:rwx
default:mask::rwx
default:other::r-x

So it looks like it worked, I guess - I see my group in the list for the new directory I created within the directory I created, without having to explicitly add the group perms. Which I guess means that if the vendor creates new directories and populates them, all the files and directories will have my group in the perms, meaning my employees who log in as members of that group will have access to the files and directories.

Thanks for the assist! I'll test more next week, that's enough for today, especially with the snow coming. LOL



___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug