How do I use chmod and chown command under Linux?
A. Use chown command to change file owner and group information. Use chmod command to change file access permissions such as read, write etc.
chown command
chown command changes the user and/or group ownership of each given file.
For example following command will setup user and group ownership to root user only for /backup directory:
# chown root:root /backup
Set user user ownership to root user and allow any member of ftp group to access file.txt (provided that they have sufficient read/write rights).
# chown root:ftp /home/data/file.txt
A. Use chown command to change file owner and group information. Use chmod command to change file access permissions such as read, write etc.
chown command
chown command changes the user and/or group ownership of each given file.
For example following command will setup user and group ownership to root user only for /backup directory:
# chown root:root /backup
Set user user ownership to root user and allow any member of ftp group to access file.txt (provided that they have sufficient read/write rights).
# chown root:ftp /home/data/file.txt
本文介绍如何使用Linux下的chown和chmod命令。chown用于更改文件的所有者和组所有权,例如将/backup目录的所有权设置为root。chmod用于修改文件权限,如读、写等。
4666

被折叠的 条评论
为什么被折叠?



