LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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: 284

Rep: Reputation: 17
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
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
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,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
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: 284

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


Reply



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

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 01:49 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration