Control access to files-ch7 Flashcards

1
Q

What does this command do $ ls -l file ?

A

shows detailed information about permissions and ownership

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

What’s the output of
$ ls -l file ?

A

-rw-rw-r–. 1 student student 0 Mar 8 17:36 file

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

What does this command do $ ls -ld /home ?

A

shows detailed information about a directory itself, and not its contents.

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

What’s the output of $ ls -ld /home ?

A

drwxr-xr-x. 5 root root 4096 Feb 31 22:00 /home

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

What type of file is l ?

A

symbolic link

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

What type of file is c ?

A

character device file

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

What type of file is b ?

A

block device file

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

What type of file is p ?

A

named pipe file

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

What type of file is s ?

A

local socket file

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

What’s chmod command used for ?

A

changes file and directory permissions from the command line

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

What does this command do “$ chmod go-rw document.pdf” ?

A

Remove read and write permission for group and other on the document.pdf file

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

$ chmod a+x myscript.sh

A

Add execute permission for everyone on the myscript.sh file

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

$ chown

A

change owner,change file ownership

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

Setting Special Permissions : setuid

A

u+s

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

Setting Special Permissions : setgid

A

g+s

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

Setting Special Permissions : sticky

A

o+t

17
Q

umask stands for ?

A

user file-creation mask

18
Q

File’s initial octal permissions

A

0666 (-rw-rw-rw-)

19
Q

Directory’s initial octal permissions

A

0777 (drwxrwxrwx)

20
Q

$ umask

A

displays the current value of the shell’s umask

21
Q

How to change the initial permissions ?

A

Use the umask command with a single octal argument

22
Q
A