Chown Introduction to Commands: command to change the owner of a file (this command can only be used by an administrator)1 . Command format:Chown USERNAME Files2 . Command function:Commands to change the owner of a folder3 . Command
Chown to change the main or owning group of a fileChange file owner: #chown Zek 123.txt (Zek is the name of the owner)#ls-L 123.txt-rw-rw-rw-1 Zek Root 12777 December 4 20:31 123.txtChange file to group such as: #chown: User1 123.txt# ls-l 123.txt-rw-rw-rw-1 Zek user1 12777 December 4 20:31 123.txtChange them together: #chown
Chown commandChown is a command used to set file owners and file associations in Unix systems. Super User Permissions are required to execute this command. OnlyOnly the file owner of a Super User and a group can change the file association group. Non-privileged users (non-Super Users) may need to set an association groupUse the chgrp command.Usage
#
Chown changes 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 have a group name or a group ID, and a file is a space-separated list of files to change permissions, and wildcard characters are supported. System administrators often use the Chown command to give users permission to use a f
or directory]CHOWN[-R] [user name: Group name] [file or directory]1) chown Test:root test3.txt Change the owner of the Test3.txt file to test user.2) Chown:test Test3.txt between the new owner and the new genus Group can be used: connection, one of the owners and the group can be empty. If the owner is empty, it should be ": belong to the group", if the group is empty, ":" Can not be taken.3) The
= reference file uses the owning group of the reference file, not the specified value-R,--recursive recursively process all files and subdirectories-V,--verbose displays diagnostic information for all files processedThe following options are used when the-r option is specified to set how to traverse the directory architecture.If you specify more than one option, only the last one will take effect.-H if the command line argument is a symbolic link to a
Iv. Linux/UNIX operating command accumulation [chmod, chown, tail], chmodchownIn Linux/UNIX, users often use the text interface to set the system or operating system. The author is constantly in touch with this command during his work, therefore, this article has been specially developed, prepared, and started. This article mainly records some of the operating co
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 wildcard characters are supported . System administrators often use the Chown command to give users permission to use a file after cop
Tags: file ima technology share Linu info PNG body Networking OneDaily one Linux command 2018-03-09Linux Command Chgrp/chownCHGRP [-parameters] [file or directory]chown [-parameters] [file owner]:[file belongs to group] [file or directory] The world is changing, it is normal, and today a colleague left, in the internet industry, which is normal.Embrace new chang
only owners can change the contents of the catalog
SUID's representative number is 4, like 4755, the result is-rwsr-xr-x.
Sgid's representative number is 2, like 6755, the result is-rwsr-sr-x.
Sticky Digit is 1, for example, 7755 is the result of-rwsr-sr-t
(Of course 7755 this chmod setting doesn't make much sense, here's just a demo)
Chown command
Use
Change the owner or group associated with the file.
4
00000100
Read, reading. The current user can read the contents of the file and the current user can browse the directory.
W
2
00000010
Write, writes. The current user can add or modify the contents of the file, and the current user can delete, move the directory or files within the directory.
X
1
00000001
Execute, execute. The current user can execute the file and the current user can enter the directory.
Ac
Linux command to change the file owner and group syntax: www.2cto. comchown [OPTION] [OWNER] [: [GROUP] FILEchown [OPTION] -- referenceRFILEFILE description: chown changes the user and/or GROUP of the specified file... linux command chown change file owner and GROUP syntax: www.2cto.com
Chown/bin/chownchown [user] [file or directory] to change the owner of a file or directoryOnly root can change the owner of a file or directoryRoot User:Mkdir/tmpTouch/tmp/test.fileUseradd MEINVpasswd MEINVChown Meinv/tmp/test.fileMEINV Users:Touch/tmp/test.file1Chown Root/tmp/test.file1 failedChgrp/bin/chgrpCHGRP [user Group] [file or directory] change the owning group of a file or directoryGroupadd StudentChgrp Student/tmp/test.fileUmaskSyntax: umas
that sobsrc.tgz is an ordinary file, the owner of the SOBSRC.TGZ has read and write permission, and the user of the same group as the SOBSRC.TGZ owner only reads, and the other user only has Read permission.After determining the access rights of a file, users can use the chmod command provided by the Linux system to reset different access rights. You can also use the Chown
Command name: chown
Permission: root
Usage: chown [-cfhvR] [-- help] [-- version] user [: group] file...
Note: Linux/Unix is a multi-person, multi-job operating system. All archives have owners. Chown can be used to change the owner of an archive. Generally, this command is
1. Change the owning user group Chgrp:CHGRP users Install.log, change the user group for Install.log to users.2. Change the file owner chown:Chown bin Install.log, change the owner of the Install.log to bn.Chown root:root Install.log, change the Install.log owner and user group to root.3. Change Permissions chmod:chmod 777 BASHRC. BASHRC permissions are set to Enabledchmod U=rwx,go=rx. BASHRC, Owner Rights rwx, user Group Rx, other people rxchmod a+w. BASHRC, everyone has write accesschmod a-x.
Useradd Wangyunpeng Create a user named Wangyunpeng passwd wangyunpeng to wangyunpeng This user to change the passwordTo use a new user for quick connect:Touch ABCD -l show file list long format pwd view the absolute path of the userLs-l/HOME/WANGYUNPENG/ABCD Root user view Wangyunpeng user-created ABCD fileChown ROOT/HOME/WANGYUNPENG/ABCD Modify Wangyunpeng The owner of the ABCD file created by the root user (only the administrator root user can modify the file owner)Linux Commands-Right
The liunx command chown is used to change the owner of a specified file to the specified user or group chown. the user can be a user name or user ID; A group can be a group name or group ID. files are separated by spaces to change the permission list. wildcards are supported. System... the liunx command
Chown can change the owner or group of a file. The file is a list of files separated by spaces to change permissions. Wildcards are supported.
The system administrator often uses the CHOWN command to grant the user the permission to use the file after copying the file to another user's directory.
Command Format:
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.