chmod Flashcards

1
Q

chmod

A

chmod changes the file mode bits of each
given file according to mode, which can be either a symbolic representation of changes to make, or an octal number representing the bit pattern for the new mode bits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

chmod

  • c
  • f
  • v
  • R

–no-preserve

–preserve-root

–reference=RFILE

A
  • c, –changes, Like verbose but only when a change is made.
  • f, –silent, –quiet
  • v, –verbose
  • R, –recursive

–no-preserve-root, Do not treat ‘/’ specially (default)

–preserve-root, Fail to operate recursively on ‘/’

–reference=RFILE, Use RFILE’s mode instead of MODE values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

chmod [MODES]

[ugoa] [-+=] [rwxXst]

[user(u), group(g), others(o), all users(a)]

[Remove permission(-), Add permission(+), Add permissions and remove unmentioned permissions(=)]

[ read(r), write(w), execute(x) or search(directories), execute/search directory(X), set user or group ID on execution(s), restricted deletion flag or sticky bit(t)

A

Numeric Mode: 1-4 (0-7) digits.

[0]000 - The first digit selects the set user ID (4) and set group ID (2) and sticky (1).

0[0]00 - The second digit sets user/owner permission read (4), write (2), execute (1).

00[0]0 - The third digit sets group permission read (4), write (2), execute (1).

000[0] - The fourth digit sets other users permission read (4), write (2), execute (1).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly