• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

chown

chown

chown Changes file owner and group.
chown [-R [-H | -L | -P]] [-fh] <owner>
									<file1>
								<file2> ...

chown [-R [-H | -L | -P]] [-fh] :<group>
									<file1>
								<file2> ...

chown [-R [-H | -L | -P]] [-fh] <owner>:<group>
								<file1>
									<file2> ...

-R Recursively descends through directory arguments to change the user ID and/or group ID.
-H If -R is specified, symbolic links on the command line are followed. Symbolic links encountered in tree traversal are not followed.
-L If -R is specified, all symbolic links are followed.
-P If -R is specified, no symbolic links are followed.
-f Forces an attempt to change user ID and/or group ID without reporting any errors.
-h If the file is a symbolic link, the user ID and/or group ID of the link is changed.
The -H, -L, and -P options are ignored unless -R is specified. Because they also override each other, the last option specified determines the action that is taken.
The -L option cannot be used with the -h option.
It is not necessary to provide both <owner> and <group>; however, one must be specified. If group is specified, it must be preceded with a colon (:).
The owner may be either a numeric user ID or a username. If a username exists for a numeric user ID, the associated username is used as for the owner. Similarly, the group may be either a numeric group ID or a group name. If a group name exists for a group ID, the associated group name is used for the group.
Unless invoked by the super user, chown clears set-user-id and set-group-id bits.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint