Mike Leone via plug on 23 Sep 2026 07:19:40 -0700


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

Re: [PLUG] setfacl confusion


More info.

I tried adding the "FileCollector" group as a secondary group to my user. But I'm still having permissions issues.

FileCollector@PHASFTP001:/ftp-area/staples/uploads$ ls -la
total 4
drwxrwxr-x+ 2 staples sftpusers  23 Sep 23 10:04 .
drwxr-xr-x. 3 root    root       77 Sep 22 16:51 ..
-rw-rw-r--+ 1 staples sftpusers 837 Sep 23 10:04 Notes.TXT
FileCollector@PHASFTP001:/ftp-area/staples/uploads$ rm Notes.TXT
rm: cannot remove 'Notes.TXT': Permission denied
FileCollector@PHASFTP001:/ftp-area/staples/uploads$ sudo getfacl Notes.TXT
[sudo] password for FileCollector:
# file: Notes.TXT
# owner: staples
# group: sftpusers
user::rw-
group::r-x                      #effective:r--
group:FileCollector:rwx         #effective:rw-
mask::rw-
other::r--

FileCollector@PHASFTP001:/ftp-area/staples/uploads$ groups
FileCollector wheel
FileCollector@PHASFTP001:/ftp-area/staples/uploads$

I can't seem to figure setfacl out. it looks (to me) like the file "Notes.TXT" allows a member of the group "FileCollector" to have rwx rights, which means a member of the group "FileCollector" should be able to delete said file.

Obviously, not the case. So I don't know how I can allow this group "FleCollector" to have rights to be able to delete files uploaded by a member of the "sftpusers" group.

Anybody? I seem to just be beating my head against a wall here.



On Tue, Sep 22, 2026 at 5:04 PM Mike Leone <turgon@mike-leone.com> wrote:
So what am I doing wrong?

Every users home folder has a sub-folder called "uploads". I want to add the group "FileCollector" to the ACL of this group, so that a user in the group "FileCollector" will be ble to remove files in the uploads folder (and only that folder).

So I did this:

ftp-admin@PHASFTP001:/ftp-area/staples$ sudo setfacl -R -d -m  g:FileCollector:rwx uploads

FileCollector@PHASFTP001:/ftp-area/staples$ getfacl uploads/
# file: uploads/
# owner: staples
# group: sftpusers
user::rwx
group::r-x
other::r-x
default:user::rwx
default:group::r-x
default:group:FileCollector:rwx
default:mask::rwx
default:other::r-x

And then I can't delete ...

FileCollector@PHASFTP001:/ftp-area/staples/uploads$ ls -la
total 0
drwxr-xr-x+ 2 staples sftpusers 28 Sep 22 16:52 .
drwxr-xr-x. 3 root    root      77 Sep 22 16:51 ..
-rw-r--r--. 1 staples sftpusers  0 Sep 22 16:52 touch-THIS.txt

FileCollector@PHASFTP001:/ftp-area/staples/uploads$ sudo getfacl touch-THIS.txt
# file: touch-THIS.txt
# owner: staples
# group: sftpusers
user::rw-
group::r--
other::r--



What did I miss?
--

Mike. Leone, <mailto:turgon@mike-leone.com>

PGP Fingerprint: 0AA8 DC47 CB63 AE3F C739 6BF9 9AB4 1EF6 5AA5 BCDF
Photo Gallery: <http://www.flickr.com/photos/mikeleonephotos>


--

Mike. Leone, <mailto:turgon@mike-leone.com>

PGP Fingerprint: 0AA8 DC47 CB63 AE3F C739 6BF9 9AB4 1EF6 5AA5 BCDF
Photo Gallery: <http://www.flickr.com/photos/mikeleonephotos>

___________________________________________________________________________
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