1

Got my web server up and running using apache2 with the ability to ftp to /var/www folder. However, if I make an update to .html and copied over the file via ftp, the file's permissions become more restrictive such that apache produces an error to the web client that file is not readable because of insufficient permissions (or something to that effect). I then have to ssh in and modify the permissions to the associated files (sudo chmod 755 *) while in /var/www.

Is there an easier to do this?

  • What are the exact permissions? As which user are you logging to ftp? – choroba Jul 23 '12 at 15:46
  • I don't have access as of now, but the I created the user ftpuser and added it to the www-data group where www-data has ownership of /var/www. I'll report the resulting permisions when I get the chance. – Chad Harrison Jul 23 '12 at 15:58
  • May be your ftp server is configured to force more restrictive premissions. Check it too if it is possible. – rush Jul 23 '12 at 16:03
2

You have few options:

  1. Set local_umask in vsftpd.conf to 022 instead of default 077
  2. Set chmod_enable to YES and do CHMOD via ftp client (if it does not do so already)

By the way, better to use scp, because it does not transmits your credentials in plaintext, and you can configure public key authentication, so you will not have to enter password each time, but I'm not sure about how it sets permissions on uploaded files.

  • This may be sad, but I didn't know about scp. Going to look into it! – Chad Harrison Jul 24 '12 at 17:46

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.