My Apache directory for storing files is /var/www.
If i run,
sudo chown -R www-data:www-data /var/www
This makes the www-data the owner of the www folder. Since all static/dynamic files will be served by the Apache User, why do i now need to give this folder 755 permissions? It should just work with giving 700 permissions, right?
I think I may have really messed something up with the chown command and need advice desperately. I was installing wordpress on my machine and following some directions online. As per the instructions I downloaded wordpress, created the wordpress db and user and copied the wordpress files to the /var/www directory. I was then supposed to give ownership of the directory to the apache user.
I am running a ec2 instance and I type in the following by mistake :
Sudo chown -R www-data :www-data /etc
And then ...... Omg sudo /bin/bash doesn't work
It says etc/ sudoers is owned by uid 33!
What do I do!?
Because it is a amazon instance, there is no way I can enter the recovery mode, is there?
Thanks in advance
So I am pretty new to managing my own permissions, and am looking for the cross between ease of use and security.
What I have found as the easiest way to manage multiple domains on a VPS (Ubuntu 12.04 server) is creating their own subdirectories in /var/www/ (root access) and using Apache Virtual Host to direct traffic to the appropriate subfolder.