Directory Permissions
If you want to prevent other users from reading the contents of your files, you have two choices:
You can set the permission of each file to 0600, so only you have read/write access.
You can put the files in a directory and set the permission of that directory to 0700, which prevents other users from accessing the files in the directory (or in any of the directory’s subdirectories) unless there is a link to the file from somewhere else.
Note the following:
You must have execute access for a directory to make it your current directory (via cd or chdir) or to change to any directory beneath (contained in) that directory.
If you do not have execute access to a directory, you cannot access the files within that directory, even if you own them.
1777 /tmp Any user can create a file in the directory, but a user cannot delete another user’s files.
0700 $HOME A user can access the contents of his home directory, but nobody else can.
Leave a Reply
You must be logged in to post a comment.