2013-12-25 12:59:24 +00:00
|
|
|
# chown
|
|
|
|
|
|
|
|
> Change the owning user/group of the specified files
|
|
|
|
|
|
|
|
- change the user of a file
|
|
|
|
|
|
|
|
`chown {{user}} {{path/to/file}}`
|
|
|
|
|
|
|
|
- change the user and group of a file
|
2015-10-22 08:31:52 +01:00
|
|
|
|
2013-12-25 12:59:24 +00:00
|
|
|
`chown {{user}}:{{group}} {{path/to/file}}`
|
|
|
|
|
|
|
|
- recursively change the owner of an entire folder
|
|
|
|
|
|
|
|
`chown -R {{user}} {{path/to/folder}}`
|
|
|
|
|
|
|
|
- change the owner of a symbolic link
|
2015-10-22 08:31:52 +01:00
|
|
|
|
2013-12-25 12:59:24 +00:00
|
|
|
`chown -h {{user}} {{path/to/symlink}}`
|
2014-08-18 11:45:43 +01:00
|
|
|
|
|
|
|
- use the owner and group of a reference file and apply those values to another file
|
|
|
|
|
|
|
|
`chown --reference={{reference-file}} {{path/to/file}}`
|