FTP user with home /var/www and group www-data has no write permission to /var/www

ftpwww-data

I have problems giving my FTP user who does not have sudo rights, write permission to /var/www.

Question:

How can I give the FTP user write permission to /var/www & subfolders only?

ls -ld says:

1@1:/var/www$ ls -ld
drwxrwsr-x 2 root www-data 4096 Feb 17 13:44 .

Groups of ftpuser:

# groups ftpuser
ftpuser : ftpuser www-data

Best Answer

Your vsftpd.conf file should contain write_enable=YES if you want to enable write support. From man vsftpd.conf:

write_enable

This controls whether any FTP commands which change the filesystem are allowed or not. These commands are: STOR, DELE, RNFR, RNTO, MKD, RMD, APPE and SITE.

Default: NO