1827295 Members
2726 Online
109717 Solutions
New Discussion

Re: permissions

 
Peter Lyons_1
Occasional Contributor

permissions

Scenario: User A needs to create a file that user B (who is in a different group) needs to be able to have modify access on. User B cannot use user A's group as a secondary group as it in the dba group. Changing the umask for either user is not an option (unless there is a way of specifying that only a certain path gets the altered umask). The file is generated automatically by an application. Any ideas?
8 REPLIES 8
Mark van Hassel
Respected Contributor

Re: permissions

Hi,

you can make use of ACLs for extended permissions, see "man acl" for more info.

HtH,

Mark
The surest sign that life exists elsewhere in the universe is that none of it has tried to contact us
Jeff Machols
Esteemed Contributor

Re: permissions

you can use ACL's (access control lists) to give a specific user access to a specific file.

man acl will give you all the details you need
Helen French
Honored Contributor

Re: permissions

Hi Peter,

U can use the "ACL" permissions for doing this. You can assign specific permission for specific users on specific files.

See man pages of 'chacl' command. Suppose A created a file 'file1' and if B wants write access to it,
# chacl 'B.%=rwx' file1.

You may put this in the crontab if needed.

HTH,
Shiju
Life is a promise, fulfill it!
Thierry Poels_1
Honored Contributor

Re: permissions

Hi,

one option is:
1. create a subdirectory e.g. /subdir
2. chgrp GROUPB /subdir
3. chmod g+S /subdir
--> all files created in /subdir will inherit GROUPB, so userB should be able to read the files.


An other option is to use ACL.

good luck,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Ian Dennison_1
Honored Contributor

Re: permissions

User A is added to the same Group as User B, performs a 'newgrp [same Group Name]' command before creating the file. User B can see this as a member of the group.

This works on the command line. Is this a workable solution for you?

Share and Enjoy! Ian
Building a dumber user
Peter Lyons_1
Occasional Contributor

Re: permissions

I have never used acl before and I got the following error when trying to use the chacl command. Do I have to enable acl somehow? Function is not available (errno = 251)
Deshpande Prashant
Honored Contributor

Re: permissions

HI
HPUX 11.00 with vxfs file system (JFS older than 3.3) does not support ACLs.

Check this link -
http://www.docs.hp.com/hpux/onlinedocs/B3929-90007/B3929-90007.html

Thanks.
Prashant.
Take it as it comes.