-2

If the folders and files permission all suddenly goes to 000 on a web sever, can it be brought back? I yes, please let me have the script that can be executed to bring the permission back.

I have a hosting account and I change 1 folder's(cur) permission in the .Mail directory and when I saved, all folders and files in the ("Home" directory and all sub folders) have their permission turned to 000 suddenly and I got confused.

Help!

4
  • I believe if you search the archives you'll find the answer to this question without having to ask it again.
    – mdpc
    May 23, 2013 at 20:58
  • Might have been better asked in SuperUser or UNIX SE.
    – mdpc
    May 23, 2013 at 20:59
  • Probably unix. Also, @ostana, there isn't such a script - the old permissions are gone, and the only thing you can do automatically is set them all the same, which is probably not what you want, but google chmod. May 23, 2013 at 21:24
  • It's been asked on Unix & Linux (probably multiple times), as well as Server Fault. The basic answer is "You're out of luck. Hope you have a backup."
    – voretaq7
    May 24, 2013 at 2:54

1 Answer 1

-1
chmod 600(or whatever you want) -R directory

This will recursively set the permissions on the directory. No need for a script. :)

It is unlikely that permissions can be set to 000 as a consequence of changing permission for one directory.

1
  • This does not "fix" or "recover" anything - it simply sets a slightly more sane value than 000. There is no reason to believe that setting everything to 600 is any better than 000...
    – voretaq7
    May 24, 2013 at 2:53

Not the answer you're looking for? Browse other questions tagged .