2014-10-02 03:39:28 +01:00
|
|
|
# chmod
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
> Change the access permissions of a file or directory.
|
2014-10-02 03:39:28 +01:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Give the (u)ser who owns a file the right to e(x)ecute it:
|
2014-10-02 03:39:28 +01:00
|
|
|
|
|
|
|
`chmod u+x {{file}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Give the user rights to (r)ead and (w)rite to a file/directory:
|
2014-10-02 03:39:28 +01:00
|
|
|
|
|
|
|
`chmod u+rw {{file}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Remove executable rights from the (g)roup:
|
2014-10-02 03:39:28 +01:00
|
|
|
|
|
|
|
`chmod g-x {{file}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Give (a)ll users rights to read and execute:
|
2014-10-02 03:39:28 +01:00
|
|
|
|
|
|
|
`chmod a+rx {{file}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Give (o)thers (not in the file owner's group) the same rights as the group:
|
2014-10-02 03:39:28 +01:00
|
|
|
|
|
|
|
`chmod o=g {{file}}`
|