-1

So let's assume I have a file inside my ~ directory called "file.txt". My ~ directory (aka user) has it's permissions set to 700. Now, let's say my file has permissions set to 664, meaning I want anyone in my group to be able to read and write that particular file. The problem is (s)he can't even access it because my home directory won't allow it. So as long as I keep my ~ 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)?

1

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 | |
0

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.