Undo chown and chmod

16.5k Views Asked by At

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.

2

There are 2 best solutions below

0
On BEST ANSWER

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.

0
On

For the second one run this command

sudo chmod 777 /opt/lampp/htdocs

I solved the same problem by using this