cancel
Showing results for 
Search instead for 
Did you mean: 
Becklin
Cadet
Cadet
  • 1,512 Views

umask

How do I set a default umask of 027 on an entire project and 077 on home directories /home?

0 Kudos
2 Replies
Forrest
Flight Engineer Flight Engineer
Flight Engineer
  • 1,494 Views

A umask is associated with an individual user, so you can't really set it on a project or a directory.  Perhaps you are talking about setting a mode (basically the opposite of a mask)?  For instance, you probably want `chmod 700 /home/*` to set the permissions on home directories to be rwx for only the owner.  Please add some more description to what you are trying to do or the final outcome that you are trying to achieve.

0 Kudos
Tracy_Baker
Starfighter Starfighter
Starfighter
  • 1,478 Views

You don't. umask is a single value that is set on a per user basis. It affects all directories and files that are created after the umask value is set (and none before the value is set).

You can use chmod to set permissions, recurively, using the -R option. For example:

sudo chmod -R 700 /home

As @Forrest said, we'd relly need to know more as setting 700 on /home is probably a bad idea.

As for "projects," which implies some sort of collaboration, you'll want to look into the following: chmod, the setgid bit, chown, and file access control lists (getfacl and setfacl).

Program Lead at Arizona's first Red Hat Academy, est. 2005
Estrella Mountain Community College
0 Kudos
Join the discussion
You must log in to join this conversation.