I am running CentOS, where I have users in a chroot SFTP setup. They are chrooted to their home directories. These users belong to the group 'sftponlyusers'. I allow these users to upload to a directory within their called 'upload' The current ACL permissions for the 'upload' directory are:
getfacl upload # file: upload # owner: root # group: root # user: rwx user:sftpuser1:-wx group::r-x group:sftpfileadmins:rwx mask::rwx other::---
I have a few users in another group called 'sftpfileadmins'. These are users that will be able to move/copy/archive the files that the sftponlyusers place in the upload directory.
sftpuser1 is able to login and place files in their /user/upload directory. However when they do so they are always the owner of the file, and the file always has the following permissions:
getfacl file.txt # file: file.txt # owner: sftpuser1 # group: sftponlyusers user::rw- group::--- other::---
This means that the sftpfileadmins cannot perform any operation on the file (they can't move, copy, or read it).
I need help to figure out the correct combination of permissions that would allow sftpuser1 to only write to the directory, while users in the group sftpfileadmins would be able to both read and write.