Ubuntu modify the file (folder) owner and user groups

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/qq_41238579/article/details/102778243

1. Change the root account

su root

2. Switch to the next you want to change the path

3. Enter the command
-R: recursively change all owners directory
hxls: Owner name
gcn /: Change directory

chown -R  hxls  gcn/

Ubuntu modify the file (folder) the owner, success!

4. Change the user group
with the same token

chgrp -R hxls gcn/

Ubuntu modify user group files (folders), and success!

Guess you like

Origin blog.csdn.net/qq_41238579/article/details/102778243