In Linux, it can be queried by PS and grep. If using the PS aux|grep nginx to query the Nginx process using what account run: Visible is the use of the WWW account running. Then the corresponding site root directory and the following file directory
, usingchown CommandChange file ownerin the shell, you can use thechown Commandto change all the files. chown Commandis the abbreviation for change owner (changing owner). It needs to be noted thatThe user must be in the existing system, that is,
1, chgrp (change file to belong to user group)
CHGRP user Group filename # # #就是这个格了. If the entire directory is changed, the plus-r parameter is used for recursion.
such as: Chgrp-r user smb.conf
The CHGRP command changes the file or
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
Chown in centos changes the file ownerPermission: rootUsage: chown [-cfhvR] [-help] [-version] user [: group] file...Required parameters:-C: display the changed information.-F ignore error messages-H: fixed the symbolic link.-R processes the
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
These two functions allow us to change the access permissions of existing files:
# Include int chmod (const char * pathname, mode_t mode); int fchmod (INT filedes, mode_t mode); two function return values: 0 if successful, and-1 if an error occurs
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
chmodChange permissions for a file: chmod [mode] File.txtChange permissions for a directory: chmod [mode] DirChange permissions for a directory and its subdirectories: chmod [mode] Dir-rmode = 777 or 752 and so on.The three digits of mode,
Chown, which is the change ownerSuch as:Hadoop-1.2.1.tar.gz the original owner as a Hadoop user, now change its owner to root:========================================================================chmod, which is the change modeThere are 10
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
After CentOS6.5 has DHCP configured, start the error with "sudo service dhcpd start", but use "sudo DHCP" to start, and then view the "/var/log/messages" file
Feb 3 09:12:32 dhcphost dhcpd:internet Systems Consortium DHCP Server 4.1.1-p1 Feb 3 09:12
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
Http://www.justwinit.cn/post/2295/
Every time you go to chmod-R *; chown-r nobody. nogroup * is very troublesome. Write a script to solve it. Then you can directly call the securecrt script -- run -- select the script!CodeAs follows:
Sub mainCRT.
Chown modify user and user group attributes of files and folders
1. The owner of the HH. c file to be modified. All users whose names are modified to sakia
Chown sakia HH. c
In this way, the user access permission of HH. C is applied to
1.chown Change the owner and group permissions for a file or directoryFormatchown [OPTION] ... [OWNER] [: [GROUP]] FILE ...Parameters:-RRecursively manipulate all directories and files in the current directory;-HChange the ownership of the symbolic
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]
UseraddAdd 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 directory-G user group: Specify the user group to
UseraddAdd 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 directory-G user group: Specify the user group to
BodyIn the terminal input:Ls-l xxx.xxx (xxx.xxx is file name)Then there will be similar messages, mostly these:-rw-rw-r--The following figure:
A total of 10 digitsWhere: The front one-represents the type, if it is a directory, the front one is DThe
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.