4

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
Deesbek
  • 210
  • 3
  • 12
  • 2
    Do you have write_enable=YES in your vsftpd.conf? You won't be able to write anywhere if that's disabled, which is the default configuration. – hcsteve Feb 17 '14 at 13:29
  • What do you guys think about the permission settings on /var/www , is the drwxrwsr-x 2 root www-data 4096 Feb 17 13:44 . secure? I eventually messed a bit with chmod –  Feb 17 '14 at 13:33
  • i just recognized, if i visit the webspace /var/www directory with the broser it says permission denied. –  Feb 17 '14 at 13:38
  • I posted the bit about write_enable as an answer - please accept it if that solved your issue. For the browser errors, I'd suggest checking your web server logs and the web server documentation for more information. If you still need help with that issue you should post a new question. – hcsteve Feb 17 '14 at 13:54
  • I will create another question shortly to solve the issue of the permission regarding the /var/www web directory, than kyou very much for the hints thus far :) –  Feb 17 '14 at 14:16

1 Answers1

3

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

hcsteve
  • 341
  • 2
  • 7