Home  >  Article  >  Backend Development  >  chown -R www.www /解决办法

chown -R www.www /解决办法

WBOY
WBOYOriginal
2016-06-13 12:20:404396browse

chown -R www.www /

本帖最后由 KL998877321 于 2015-05-22 09:43:39 编辑 用git push之后,再拉到网站目录写错了,chown -R www.www  /,之后再运行chown -R root.root  /,然后许多服务不能运行了。
之后叫人帮我改了服务的所有者和所有组,表面上看上去好了。
现在怎么尽可能的修复这个坑?
------解决思路----------------------
chown -R www:www /home/wwwroot/default
/home/wwwroot/default是你的网站目录

chown -R root.root  /
你这样把所有文件都改为了root的权限才能执行,可能导致其它用户权限不能运行自己的服务,找到一个改一个把,如mysql,nginx

------解决思路----------------------
应该不会,其实也没那么严重,遇到那么服务不能运行,就看改一下所有者就行了,应该也不是很多
------解决思路----------------------
将目录设置为,www账户可读权限呢
------解决思路----------------------
把文件的所属组 所属用户 改成 和执行nginx php 的用户相同 即可。试用root执行就是个吭。安全隐患太大
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn