Friday, January 26, 2024

[SOLVED] Effects of chmod 777 /. -R with root

Issue

So one of my colleges just did the above to try and fix some permission issues I got him to ctrl-C it quite quickly. The server seams to be ok but im worried.

What would the effect of "/." be, equivalent to "/"?

Any way to fix essential server permission that are now 777?


Solution

Every directory in Linux contains the two special directory names "." and "..". The ".." meaning "up-one" in the directory tree and the "." meaning the current node in the tree. This includes the root ("/") directory:

$ ls -la /
total 472
drwxr-xr-x  29 root root   4096 Nov 22 13:03 .
drwxr-xr-x  29 root root   4096 Nov 22 13:03 ..

So executing a command on the directory "/." is really saying "execute this command on the '.' directory inside of '/'", which is just the root itself.

As far as fixing the original permissions... I hope you've made system backups :)



Answered By - Christopher Neylan
Answer Checked By - Cary Denson (WPSolving Admin)