LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   Changing Umask (https://www.linuxquestions.org/questions/linux-enterprise-47/changing-umask-4175456787/)

manoj.linux 04-03-2013 11:30 PM

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.

pan64 04-04-2013 12:51 AM

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.

shivaa 04-04-2013 03:28 AM

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.

cyberpatrol 04-04-2013 03:57 AM

Quote:

Originally Posted by shivaa (Post 4924837)
Then for user A, set umask value (in .bashrc or .profile) to 007.

If you use X then additionally set umask in .xinitrc.

manoj.linux 04-04-2013 10:33 AM

Thanks a lot Shivaa.


All times are GMT -5. The time now is 02:36 PM.