Undo chown and chmod

Vijay Singh picture Vijay Singh · Nov 17, 2014 · Viewed 12k times · Source

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.

Answer

kriyeta picture kriyeta · Nov 17, 2014

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.