Question

So the problem is, when we create new websites on our dev server, some of the files and folders created don't have the execute rights so we have to manually do a chmod -R 777 /web/websitename

Here is an example of a freshly created website folder : http://i.stack.imgur.com/ipw5E.png

So now my question is : is there a way to make it so that we don't have to manually set rights everytime a new folder is created? Thanks in advance. (the umask of the user running php / apache is 022)

Was it helpful?

Solution

What i see you are creating your websites in /web which is not recommendable, you should always create website in /var/www/html which is the default DocumentRoot of apache in redhat/centos linux or you can use an ISP control panel package such as virtualmin with webmin to do hosting. Basically try setting the website in /var/www/html you won't need to change the permission or if you change the DocumentRoot try giving the ownership.

Thanks & Regards,
Alok

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top