I have a site called site1 located in /var/www/site1, and it is owned by www-data user. The group permission is belong www-data group.
The web server is Apache2. The FTP server is ProFTPD.
As we allow FTP for an external user called externalftpusr to FTP in.
How do I allow this FTP user to upload/change the file accordingly to this /var/www/site1 ?
So far, we did:
sudo chmod -a -G www-data externalftpusr
When we upload a file, we have this error on FTP client: 550 index.html: Permission denied
We prefer to keep www-data as user on ownership of the site.
I am appreciated your help.
Thanks
www-data? The one in your question is incomplete (which could explain why it didn’t work) – matigo Dec 05 '22 at 22:16grep ^www-data /etc/group... we can confirm that externalftpusr user on that group. – dcpartners Dec 05 '22 at 23:07usermod, as you are modifying a user account. It will also be important to confirm that the permissions on the directory match those of the files, ideally with a755or775(never use777) – matigo Dec 05 '22 at 23:25www-datauser, and your question says the files are owned by that user so it already has full permissions. – muru Dec 06 '22 at 04:44www-datauser by default. – muru Dec 06 '22 at 05:07ps aux | egrep '(apache|httpd)'and I found www-data as user. For allowing this externalftpusr updating files to via FTP, 775 looks the way to go. – dcpartners Dec 06 '22 at 05:17