-1

Hypothetical situation:
What would be the long term effects of running sudo chmod -R 777 /? I know that it means that all users have full permissions on all files, but are there any other side-effects?

  • 1
    There's actually a pretty good list of the issues on this Q on serverfault: http://serverfault.com/questions/364677/why-is-chmod-r-777-destructive – ilkkachu Mar 25 '17 at 15:27
  • Also related, maybe even the same: http://unix.stackexchange.com/questions/12998/wrongly-set-chmod-777-problems – ilkkachu Mar 25 '17 at 15:27
  • Can anyone tell me how to fix every thing as it was previously, once I run the command sudo chmod -R 777 / – Banty Roy May 31 '18 at 13:21

2 Answers2

3

That will make your OS unusable by removing the suid bit of some executables that need it.

jlliagre
  • 61,204
0

Without talking about security issue, yes there is some-side effects.

one of them is, by changing root folder permission to 777 and all subfiles and folders even binary programs.. you're not changing only those simple permissions, there is something called sticky bits permissions, and this command sudo chmod -R 777 / will erase them for sure.

you can read about it here and you'll know how impotent they are. so be aware of this command line.

you can find all files and folders with sticky-bits permissions with this command

find / -perm -2000 -perm -4000 -perm -1000 -exec ls -l {} \;

or for folders:

find / -perm -1000 -exec ls -ld {} \;
zied
  • 151