The chown command is used to change the owner and group of files or directories. The superuser permission is required to use this command.
Introduction
The chown command is used to change the owner and group of files or directories. This command
##################################### Rights Management directive chmod CHGRP Chown ## Modified time: 20160529 #####################################------------------------------------------------------------------chmodThe basic rights of Linux
Questions Guide: 1.What is the meaning of Chown's English? What is the meaning of 2.chmod English? What permissions does 3.chown change? What permissions does 4.chmod change? These two for beginners very easy to mix, here ch, in fact, is the
After using Git push, and then pull to the site directory is wrong, chown-r www.www/, then run Chown-r root.root/, and then many services can not run.
Then I asked someone to change the service owner and all the groups, and it looked good on the
ChownIs a command used to set file owners and file associations in UNIX systems. Super User Permissions are required to execute this command. Only the file owner of the file group and the super user can change the file association group. If you do
Differences between CentOS commands usermod, chown, and chmod
For Linux beginners, I often confuse the differences between chown and chmod. This blog is for reference.Usermod is used to modify the UID, GID, and groups of a user. Usage:
Usermod-u 99
Chown Modify the files and folders of the user and user Group property 1, to modify the owner of the file hh.c. Modify this user for Sakia all chown Sakia hh.c This applies hh.c user access to Sakia as owner 2, directory/tmp/sco Change the owner and
1 . Command format:chown [Options] ... Owner [: [Group]] file ...2 . Command function:Change the file owner and group by Chown. You can use the user name and user identification number settings when you change the owner or group of the file.
chmod Modify the first column of content,chown Modify the contents of 3rd, 4 columns:Chown usage:The user name and user group used to change a directory or file.Chown User name: Group name file path (can be an absolute path or a relative
, usingchown CommandChange file ownerin the shell, you can use thechown Commandto change the file owner. chown Commandis the abbreviation for change owner (changing owner). It is important to note thatThe user must be in an existing system, which
Command name: chmod
Permission: All Users
Usage: chmod [-CFVR] [-- help] [-- version] mode file...
Note: file access permissions for Linux/Unix are classified into three levels: file owner, group, and others. Chmod can be used to control how files
I. CHOWN command
Purpose:Change the file owner or group.The command is composed of the word change owner.
Example:
1. Change the file owner:
Chown Jim program. c
The owner of the file program. C is changed to Jim. As the owner, Jim can use
Linux User and permissions detailedRights ManagementChown chgrp chmod umask################################################Chown: Modify Owner-R: Modify the directory and its internal genera group--referenceChown username:grpname file simultaneously
1, CHGRP (change the file belongs to the user group)CHGRP (transform file to user group) change GroupCHGRP user Group filename # # #便是这个格了. If the entire contents are changed, the plus-r parameter is used for recursion.Example: Chgrp-r user smb.conf2
1,file command function, view the type of file[Email protected]:~$dirname./linux/rename/1. htm./linux/Rename[email protected]:~$file./linux/rename/1. htm./linux/rename/1. Htm:empty[email protected]:~$Echo 'This is a HTML file'>./linux/rename/1. htm [
A file directory permission definitionFirst of all, let's meet the permissions definition of the file directory, and see the ls-l results below.We found a file or directory in front of the 10-bit information, the first bit represents the file type,
chmod Modify the first column of content,chown Modify the contents of 3rd, 4 columns:Chown usage:The user name and user group used to change a directory or file.Chown User name: Group name file path (can be an absolute path or a relative
Command function:Chown the owner of the specified file to the specified user or group, the user can be either a user name or a user ID; a group can be a group name or a group ID; a file is a space-separated list of files to change permissions, and
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.