Link to home
Start Free TrialLog in
Avatar of jskfan
jskfanFlag for Cyprus

asked on

Usermode,Chmod,chgrp,chown

I would like to understand how the following commands are used and in which case each command is used.

Usermode
Chmod
chgrp
chown

Thank you
SOLUTION
Avatar of Mazdajai
Mazdajai
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jskfan

ASKER

Can you please provide some examples , that will show the difference between each command as well the usage of it…

I read online about each command on :http://www.computerhope.com/unix

but not really enough. the way you explained them, looks good it can be better if you add examples for each command.

usermod - modify a user account
example:
chmod - change file permission / mode bits
example:
chgrp - change group ownership
example:
chown - change file owner and group
example:

Thank you
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jskfan

ASKER

Correct me if I am wrong

So when you want to  give ownership of a file or a folder to a Group you  use Chgrp.
Example: Chgrp GroupX /Xfolder : GroupX will have folder ownership of Xfolder
Or Chgrp GroupX /Xfolder/Xfile  : GroupX will have only File ownership of Xfile without giving the group GroupX ownership of Xfolder.

Chown , seems like it does the same thing as Chgrp, but it is used to give permission to a user instead of a group

those 4 commands , they looks like they overlap in their usage, that s what confuses me
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jskfan

ASKER

Thank you Guys!