问题
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