3

I am new to linux and I installed linux for web server purpose with apache2. I have created a new directory /var/www/mysite. My main problem is that each new file I create has read only permissions 644 permissions using root user. I would like each new file created to have 775 permission. I am using FTP to update my files and simply each time I upload or create a new file I need to login via ssh and update permissions.

I read around that there is UMASK and some ways to change default permissions for groups/users but I am not quite sure what would be the best solution.

Thanks in advance for any help...

Wolfgang
  • 718
nimi
  • 131

1 Answers1

0

Yes, if you upload files by ftp the file permissions usually get set by the ftp server. For vsftp see http://ubuntuforums.org/showthread.php?t=1570700 for a real "short", similar question and/or https://security.appspot.com/vsftpd/FAQ.txt (search for umask) for a "long" version.

Q) Help! Uploaded files are appearing with permissions -rw-------.

A1) Depending on if this is an upload by a local user or an anonymous user, use "local_umask" or "anon_umask" to change this. For example, use "anon_umask=022" to give anonymously uploaded files permissions -rw-r--r--. Note that the "0" before the "22" is important. A2) Also see the vsftpd.conf.5 man page for the new "file_open_mode" parameter.

Wolfgang
  • 718