LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices

Reply
 
Search this Thread
Old 04-03-2013, 11:30 PM   #1
manoj.linux
Member
 
Registered: Aug 2007
Posts: 227

Rep: Reputation: 15
Question Changing Umask


Hi,

is it possible to set umask for particular user?

example:-

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
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,831

Rep: Reputation: 1286Reputation: 1286Reputation: 1286Reputation: 1286Reputation: 1286Reputation: 1286Reputation: 1286Reputation: 1286Reputation: 1286
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
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,797
Blog Entries: 4

Rep: Reputation: 285Reputation: 285Reputation: 285
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
cyberpatrol
Member
 
Registered: Dec 2012
Posts: 75

Rep: Reputation: Disabled
Quote:
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
manoj.linux
Member
 
Registered: Aug 2007
Posts: 227

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


Reply


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


All times are GMT -5. The time now is 11:38 PM.

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