It's very simple.
For User:
chown username filename
chown username directoryname
Recursively:
chown -R username directoryname
For Group:
chgrp groupname filename
chgrp groupname directoryname
Recursively:
chgrp -R groupname directoryname
-----
Change groupname and username at the same time.
chown username:groupname filename
Change username and groupname at the same time recursively.
chown -R username:groupname directoryname
Source: http://www.mysysad.com/2006/09/change-group-attributes-to-file.html
No comments:
Post a Comment