LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Wrong permissions on VSFTP umasks (https://www.linuxquestions.org/questions/linux-newbie-8/wrong-permissions-on-vsftp-umasks-4175468998/)

Yaeger 07-09-2013 08:46 AM

Wrong permissions on VSFTP umasks
 
Hello everyone!

I'm trying to set up a webserver on my Debian 7.0 VPS. Now I've set up the apache webserver, mysql and ftp access. I only want 1 user to be able to upload files to the webfolder so I created a user called 'ftp'. This user is member of the www-data group and every file he adds to the webfolder is owned by group www-data.

What I want to achieve now is that every new file I add gets 664 permissions and every directory I add should get 775 permissions. So, I set the local_umask setting to 002.

The results I'm getting is 772 for directories and 662. Can someone explain me why this is? I just can't wrap my head around :S

Thanks alot!

slipstreamed 07-09-2013 11:06 AM

Set umask value in the .bashrc file of user ftp
Code:

echo "umask 002" >> $home/.bashrc
also leave the local_umask value to 002 in vsftp config

Yaeger 07-09-2013 11:48 AM

Quote:

Originally Posted by slipstreamed (Post 4987061)
Set umask value in the .bashrc file of user ftp
Code:

echo "umask 002" >> $home/.bashrc
also leave the local_umask value to 002 in vsftp config

Thanks alot, that worked! :)


All times are GMT -5. The time now is 08:13 PM.