Friday, November 16, 2018

ubuntu - Apache www permissions for php script

I have a php script which run a private social network.
It's running on a Ubuntu 16.04.03 with an mariadb and apache 2 and php7 config.



I have created a new folder in /var/www/myscript and copied all files in this folder.



My question is now, what permissions are necessary to make the config safe.
Is it safe to set all files to 640 and all folders to 750 and owner and user to www-data?



I found this tutorial, http://fideloper.com/user-group-permissions-chmod-apache
The permissions looks different, are these permissions good, too?




It would be great if someone can help me.
Thank you very much.
Best regards

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...