I am interested in setting an ACL which will chown all the files I upload through FTP to the www-data group.

However, after performing

chown -R user:www-data /var/www/website.com/public_html/
setfacl -dRm g:www-data:rwx /var/www/scwist.ca/public_html/

every file that I upload through the FTP isn't assigned to the www-data group but assigns the files to the user who uploaded the files.

What command should I be entering?


Use chmod g+s public_html to make new files created in the directory inherit the group of the directory. You don't need ACLs to achieve that, although you may want to use them for other reasons.

Strictly, this behaviour is filesystem- and platform-specific, but it works under Linux for common filesystems. It is commonly supported elsewhere too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.