Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 permisions become more restrictive such that apache produces an error to the web client that file is not readable because of insufficient permision (or something to that effect). I then have to ssh in and modify the permisions to the associated files (sudo chmod 755 *) while in /var/www. Is there an easier to do this?

share|improve this question
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. – hydroparadise 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

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.

share|improve this answer
This may be sad, but I didn't know about scp. Going to look into it! – hydroparadise Jul 24 '12 at 17:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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