System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple owner and groups to file and directory

SOLVED
Go to solution
Manoj1
Advisor

Multiple owner and groups to file and directory

Hi All,

How do we give multiple owners or groups permissions to a file or directory ?

Thanks,
Manoj
4 REPLIES
Bill Hassell
Honored Contributor
Solution

Re: Multiple owner and groups to file and directory

man acl

This gives you lots of additional controls for files and directories.


Bill Hassell, sysadmin
hvhari
Esteemed Contributor

Re: Multiple owner and groups to file and directory

you can achieve this via ACL.
Regards,
Hari

If this post was useful , click the Kudos Star on the left side to say Thanks!
nijokj
Trusted Contributor

Re: Multiple owner and groups to file and directory

you can set this by using chacl command.


The general form for the chacl command is as follows:


$ chacl 'user.group operator mode' file_name


where: user and group indicate the user's login name and group; a percent sign (%) means all users or groups. The operator indicates adding (+) or denying (-) permissions and an equals sign (=) means "this permission exactly." The mode indicates the permissions allowed: read (r), write (w), and execute/search (x). An operator immediately precedes the mode (for example, +rw adds read and write permissions; -rw denies read and write permissions).


$ chacl 'carolyn.users=rw' myfile


$ ll myfile


-rw-r-----+ 1 nora users 236 Mar 8 14:23 myfile


$ lsacl myfile


(carolyn,users,rw-) (nora.%,rwx) (%.users,r--)(%.%,---) myfile
INH
Regular Advisor

Re: Multiple owner and groups to file and directory

Manoj,

Refer manual pages of acl & chaclhave many more options can use accordingly

Rgds,
INH
Knowledge is power