I have a Centos 7 server running the latest version of Plesk.
I want to create a user called all_sftp
that has sftp only access to everything under /var/www/vhosts/
I've made the user, chrooted so their home directory just has vhosts folder in it, I've they're in a group called sftponly and that's all working fine.
I then use setfacl to give that user permission to vhosts:
setfacl -R -m u:all_sftp:rwx /var/www/vhosts # set it on everything right now
setfacl -Rd -m u:all_sftp:rwx /var/www/vhosts # make it the default for newly added files/folders
setfacl -R -x u:all_sftp /var/www/vhosts/system # remove permissions for system folder
setfacl -Rd -x u:all_sftp /var/www/vhosts/system # remove default permissions for system folder
That works and gives the account access to everything in vhosts, however when I create a new website in Plesk the folder is created with 710 permissions and the all_sftp user is locked out.
How do I give the all_sftp access to new websites automatically?
Thanks!