[命令] Linux 命令 chown (归属文件或目录)

案例一:将 test.txt 的所属主设置为 root

# chown root test.txt

或者:

# chown root: test.txt

案例二:将 test.txt 的所属组设置为 root

# chown :root test.txt

案例三:将 test.txt 的所数主设置为 root,所属组设置为 root

# chown root:root test.txt