Wednesday, September 27, 2006

Change User/Group Attributes to a File

It's very simple.

For User:
chown username filename
chown username directoryname

chown -R username directoryname

For Group:
chgrp groupname filename
chgrp groupname directoryname

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


Anonymous said...

thanks for that esofthub, really userful, especially changing both at once! dash good karma man!

esofthub said...

No problem. I always like to help if all possible.