Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to setup a LAMP stack on my Ubuntu box. Apache, PHP and MySQL work and I have installed proftpd for FTP access to my www/ folder. The problem is, I'm not sure how to configure the permissions so that I have full access to that entire folder and all its files AND all the future files I dump in there.

I have been messing around and am able to put files into the folder but new directories and the uploaded files have restrictive permissions. Is it possible to set the max permissions for that folder indefinitely so that I always have full access to it and all its sub folders/files under any conditions.

Thanks for the help.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You will have to change the umask for proftpd.

The configuration file is located under /etc/proftpd.conf or /usr/local/etc/proftpd.conf depending on your install, and it uses Apache-like directives (full details found here). For a specific directory you can use a <Directory> block directive in the configuration file pointing to your www folder.

In there, ensure you have a umask directive like so:

<Directory /var/www>
umask 0000
</Directory>

Remember, the umask is the value subtracted from 777 to create the default permission for a new folder, and 666 for files (no execute bit by design).

share|improve this answer
    
I used your method but was still having some trouble, so I changed the value to "umask 0000", rebooted and all was good. +1 and accepted answer for saving the day. –  Sam152 Dec 12 '09 at 19:17
    
You're most welcome! –  John T Dec 12 '09 at 20:24

Your Answer

 
discard

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.