Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.


  Search this Thread
Old 04-03-2013, 11:30 PM   #1
Registered: Aug 2007
Posts: 276

Rep: Reputation: 17
Question Changing Umask


is it possible to set umask for particular user?


if user A wants that Only user B should have Read / Write Permissions whatever New Files and New Folder created by User A

is it possible that umask value can be changed only for User B? if not what is alternate way?

I have used ACL but when new folder and new files are created by user A, it is not working.
Old 04-04-2013, 12:51 AM   #2
LQ Guru
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,432

Rep: Reputation: 2769Reputation: 2769Reputation: 2769Reputation: 2769Reputation: 2769Reputation: 2769Reputation: 2769Reputation: 2769Reputation: 2769Reputation: 2769Reputation: 2769
probably by specific groups. the files will belong to a given group, groups can have access (read or write), and users may (or may not) belong to those groups.
Old 04-04-2013, 03:28 AM   #3
Senior Member
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Simple umask will not help you here. In addition to that you should create a new group and add that group as user A's primary group and user B's secondary group.

Then for user A, set umask value (in .bashrc or .profile) to 007.

In this way, any new file created by user A, will get permission mode rwxrwx--- and main group as new group, so user B will have all read/write/execute permissions on that file.
Old 04-04-2013, 03:57 AM   #4
Registered: Dec 2012
Posts: 75

Rep: Reputation: Disabled
Originally Posted by shivaa View Post
Then for user A, set umask value (in .bashrc or .profile) to 007.
If you use X then additionally set umask in .xinitrc.
Old 04-04-2013, 10:33 AM   #5
Registered: Aug 2007
Posts: 276

Original Poster
Rep: Reputation: 17
Thanks a lot Shivaa.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
umask and permissions: has umask 007 bad side effects? browny_amiga Linux - General 2 09-09-2011 08:01 AM
Changing default umask lotsofquestions Ubuntu 1 08-21-2011 01:14 PM
Enhanceing login authentication + changing umask of local user to root josgeorge Red Hat 2 09-10-2009 01:51 AM
Group write access for newly created files/directories without changing umask fhd Linux - Security 3 04-05-2009 05:28 AM
Changing umask RHG Linux - Networking 2 10-20-2003 02:26 PM > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 09:37 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration