apache - Secure /var/www webroot directory - setting permissions and -


so far, everytime setting apache server adding user www-data group , changing ownership of /var/www directory group , setting sgid whole directory.

#useradd -g www-data ftpuser #chgrp -r www-data /var/www #chmod 2775 /var/www 

this time have setup web server more serious stuff (our companys project manager) , ive seen approach criticized on internet. example here:

https://askubuntu.com/questions/386928/default-permissions-for-var-www

as can see kamil user advising same approach doing , thomasrutter call solution malicious. thomasrutter solution in opinion strict ftp user wont able change ownership of directories www-data group.

also found approach based on bindfs found here: http://blog.netgusto.com/solving-web-file-permissions-problem-once-and-for-all/

so best solution secure sever if:

  • there 1 site on it
  • there 1 (ftp) user change code
  • site has upload form files, , creating own directories
  • server secured ovpn outside have secure enough inside.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -