Strangely enough, I haven't found a satisfactory answer to this question. I need to set up proper permissions for my university server home directory:

  1. public access to the public_html/ sub-folder of my home folder
  2. no access (read/write/execute) to anything else in my home folder
  3. access for my thunderbird client to relevant alpine files

So far, I have set 701 for my home folder, 755 for public_html subfoler and 700 for other files and directories. Is that fine? Any potential problems with it?

How about newly created files and directories, how do I make them 700 by default?

1 Answer 1


If the directories are set up that way and you are not the first student, you can assume that the permissions will be fine. If you don't think so, then explain why.

  1. Your home directory has 701 or u=rwx,o=x to allow the web server access to public_html. As a consequence, others (but not group) can access files or directories with known names, provided the files or directories allow that access
  2. Your public_html should be fine, 705 should also work but doesn't make a difference.
  3. 700 means access only for you.

You shouldn't create new files with 700, unless you want them executable. Just add

umask 077

to your .profile or in the shell to create files with 600 and directories with 700. Use just umask to see the current value, with your setup it is probably already configured this way.

  • "you can assume that the permissions will be fine. If you don't think so, then explain why." Because I did the set-up just by guesswork.
    – wondering
    Commented Oct 5, 2018 at 11:50
  • I created a new file .profile in my home, but the "umask 077" did not do what I wanted, a file created in vim has permissions 644. What to do?
    – wondering
    Commented Oct 5, 2018 at 11:56
  • The .profile is evaluated when you login or with the command source .profile.
    – RalfFriedl
    Commented Oct 5, 2018 at 17:28
  • be aware, the 1 in 701 means anyone can read and edit the contents of a file in this directory, assuming they have read and write access permissions on the file itself too. Commented Jul 17, 2022 at 14:28

You must log in to answer this question.

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