Undo chown and chmod [closed]

我只是一个虾纸丫 提交于 2019-12-10 11:55:11

问题


I'm new to Ubuntu.

I ran the following commands to save files in htdocs folder (to conveniently use XAMPP for programming) without understanding its security consequences:

sudo chown username:groupname /opt/lampp/htdocs
sudo chmod 700 /opt/lampp/htdocs

I would like to undo the file permissions (on the htdocs folder) to what it was before I ran the above commands.

Any help is much appreciated, thanks.


回答1:


I think there is no way undo chown and chmod. But you can see default permission of these folder in any other machine which has fresh installation or you can install lampp again in different folder. Then change chown and chmod permissions of /opt/lampp/htdocs to default.




回答2:


For the second one run this command

sudo chmod 777 /opt/lampp/htdocs

I solved the same problem by using this



来源:https://stackoverflow.com/questions/26980581/undo-chown-and-chmod

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!