0

I share a Linux server with several people. Is it better to change the permissions of files and directories under my home? I wonder if other or group users will have access to or even modify my files.

Except ~/public_html, is it all right to change the permissions of all the other files and directories including hidden ones to be unreadable, unwritable and unexecutable for other and group users?

I find some directories under my home has permission like this drwsrws---. I saw somewhere online that the s is the set-UID or set-groupID flag. But What does s mean actually for the group users? Is it safe to drop it?

migrated from stackoverflow.com Sep 15 '09 at 21:55

This question came from our site for professional and enthusiast programmers.

  • btw, this should probably be on serverfault.com – Taylor Leese Sep 15 '09 at 19:03
  • you mean superuser.com. – Peter Sep 15 '09 at 19:48
1

Yes, you should change files/folders that you don't want read by others like this:

chmod go-rwx SECRET_FILE_OR_FOLDER

(this makes it unable to be read, written or by anyone else.)

You should also make sure you have the right modes on your home directory, eg,

chmod go-w ~
  • If necessary, you can also do something like this. <code>-R</code> means recursive. <code>chmod -R go-rwx $HOME</code> This will do the same as Peter's suggestion while at the same time stripping non-owner rights from ALL files in your home directory. – UtahJarhead Oct 2 '12 at 20:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.