Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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
up vote 1 down vote accepted

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 ~
share|improve this answer
    
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

You must log in to answer this question.

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