Permissions Flashcards

1
Q

Set user id upon execution

A

> setuid

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

Set group ID

A

> setgid

so files are executed with the permissions of the group of the user who runs it. This is easier to manage.

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

Assign file permissions to file owner only

A

Sticky bit
If it is turned on only owner of file can delete the file. If off then anyone else can too.

> chmod
Adds or removes sticky bit

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

File pointers
1. Regular file

  1. Directory
  2. Symbolic link
  3. Read
  4. Write
  5. Execute
A

1, -

  1. d
  2. l
  3. r
  4. w
  5. e
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Show what groups user is in

Change user group permissions

A

> groups [user]

> chmod + / - / = “r / w / x”

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

General Permissions concepts

A

Put files into directories that can be accessed by privileged groups
> Permissions must be set on both levels:
1. File permissions
2. Directory permissions

> Default permission of file are based on where it was created (directory)

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

Permissions
>File Mode
>Binary
>Octal

A
Octal    File Mode   Binary
  0              ---            000    > no permissions
  1               --x           001
  2             -w-           010
  3            -wx           011
  4            r--             100
  5            r-x            101
  6            rw-           110
  7            rwx           111
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Permission Type

A

>

  • : file
    d : directory
    l : link
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Group commands

A

> groupadd
group mod
groups [username] (shows groups the user is in)

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

User commands

A

> useradd [username] and >passwd [user password]
useradd -r [name of service account]
userdel
usermod

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

View Permissions

A

> ls -l

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

Switching users

A

sudo su [username]

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

Identifying the user you are logged in as

A

whoami

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

Permission File

A

Read (r) &raquo_space;> Allows a file to be read.

Write (w) >&raquo_space; Allows a file to modified.

Execute (x)&raquo_space; Allows the execution of a
file.

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

Permissions Directory

A

Read (r)&raquo_space;Allows file names in the
directory to be read.

Write (w)&raquo_space;>Allows entries to be
modified within the
directory.

Execute (x)&raquo_space;Allows access to contents
and metadata for entries.

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

Permission Categories

A

u&raquo_space; User
g&raquo_space; Group
o&raquo_space; Other
a&raquo_space; All

User Group Other

4 2 1

17
Q

File permission for new files

Explain> mask

A

In computing, umask is a command that determines the settings of a mask that controls how file permissions are set for newly created files. … umask may also refer to a function that sets the mask, or it may refer to the mask itself, which is formally known as the file mode creation mask.

18
Q

Setting umask

Sets the file creation mask to mode

A

umask [-S] [mode]

Use -S to for symbolic notation.

19
Q

Common Umask Modes

A

022
002
077
007

20
Q

special umask modes

A

○ setuid
○ setgid
○ sticky