简体   繁体   English

我们的脚本生成的文件夹/文件没有适当的权限

[英]The folders / files generated by our scripts don't have the proper rights

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 所以问题是,当我们在开发服务器上创建新网站时,创建的某些文件和文件夹没有执行权限,因此我们必须手动执行chmod -R 777 / web / websitename

Here is an example of a freshly created website folder : http://i.stack.imgur.com/ipw5E.png 这是一个新创建的网站文件夹的示例: 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) (运行php / apache的用户的umask为022)

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. 我看到的是您不建议在/ web中创建网站,您应该始终在/ var / www / html中创建网站,这是redhat / centos linux中apache的默认DocumentRoot,或者您可以使用ISP控制面板包与virtualmin一起使用webmin进行托管。 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. 基本上,尝试在/ var / www / html中设置网站,您不需要更改权限,或者如果您更改DocumentRoot,请尝试提供所有权。

Thanks & Regards, 感谢和问候,
Alok 阿洛克

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM