1. I have a file inside my ~ directory called file.txt.
  2. My ~ directory has it's permissions set to 700.
  3. My file has permissions set to 664.

The problem is, no one can even access it because my home directory won't allow it.

So, as long as I keep my home directory permissions fixed to 700 only me and root can access those files, regardless of their individual permissions, right?

If so, why bother set a file to 600 instead of the standard 644?

In other words, is there a point to change the file mode creation mask to 600 for that kind of files (assuming you have more than one user in your system and that your ~ directory permissions is set to 700)?


Ok I found the answer here

If you create a file underneath ~ which is readable by others and then create a hard link to this file in an accessible path, they'll be able to read it regardless of the permissions on ~.

| improve this answer | |

That would be true if you set your home directory permission to 700. But that is not the default setting. On Ubuntu server a new user's home directory gets 'drwxr-xr-x'. That gives a good reason to set some individual permissions for your files and directories.

| improve this answer | |
  • I believe you are right about Ubuntu desktop and all debian-based distributions for that matter. What confuses me is the fact that am running Arch Linux and the completely unchanged umask is setting the permissions to 700 by default. – Rayleigh Jan 20 at 13:29

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.