Usage
The syntax for calling chgrp is
Chgrp group name Target 1 [Target 2...]
"Group name" is the group to be associated with the file.
"Target 1 [Target 2...]" is a list of files or directories in the group to be changed.
Note:"Group
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
Daily 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
The chrgp (change group) is managed by the owner and the group in which the file or directory permissions are controlled in the unix system family.You can use the chgrp command to retrieve the change file and the group to which the directory belongs.
1, CHGRP (change the file belongs to user group) changes groupCHGRP user Group filename # # #便是这个格了. If the entire contents are changed, the plus-r parameter is used for recursion.Example: Chgrp-r user smb.conf2. Chown (transform file owner) Change
chgrp Change Group changes the user group that the file belongs to eg. Chgrp-r User 1.txt[[email protected] test]# ll Query the files and properties under the test directory total 0 is now empty, no files [[email protected ] test]
CHGRP changing the owning user groupThe group name to be changed must exist within the/etc/group file;CHGRP [-R] Dirname/filename-r: Continuous changes to the recursive, with all files and directories under the subdirectory updated to the new user
1.7.4 Modify security Settings
If you have already created a file or directory, and you need to modify its security settings. 1. Modify Permissions
The chmod command allows you to modify the security settings for files and directories. The format
Change the group associated with a filechgrp [Options] group File-listParameters Group is the name or numeric ID of the new group,file-list is the list of file path names for which to change the associated groupOptions-C Display Change process
How to change files/folders ownership
Sudo chown username/location_of_files_or_folders
If you want to change ownership of all containing files and folders recursively, use the-r option like this:
Sudo chown-r
Linux file owner and owner group Change file properties 1, chgrp: Change file groupGrammar:[-R] belongs to group name file nameParameter options
-R: Recursively change the group of files, that is, when you change the genus of a directory
We know that file permissions for a system security importance, but also know the file permissions for users and groups of relevance, then how to modify the attributes and permissions of a file.
Here are a few instructions that are commonly used for
The chmod command is a command used to change file or folder permissionsUse the method for chmod [who] [+ |-| =] [mode] File nameThe mode method is as follows:The numbers correspond to characters as follows:R=4,w=2,x=1To rwx the property, 4+2+1=7To
Feature Description: change the group to which the file or directory belongs.
Syntax Description:chgrp [-cfhrv][--help][--version][owned group] [file or directory ...] or chgrp [-cfhrv][--help] [--reference =][--version][file or directory ...]
Http://www.cnblogs.com/xrq730/p/4931173.htmlUseraddAdd a new user account, only the root account can be operated-D Directory: Specify the home directory (default in Home), if this directory does not exist, you can use-m to create the main
Description
This manual page documents the GNU version of chown. chown changes
User and/or group ownership of each given file, according to its first
Non-option argument, which is interpreted as follows. If only a user
Name (or numeric user ID) 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
Rights Management:R:W:X:Three types of users:U: OwnerG: Genus GroupO: Other usersChown: Change file owner (only administrators can use this command)-R: Modify the owner of the directory and its internal files--reference=/path/to/somefile file,...
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.