2009-06-23, 12:26
#1
hej!
Håller på med lite uppgifter, skulle behöva lite hjälp på traven så att säga.
7. User per has logged in and opened the directory exam in his home directory. He gives
the command ls -al to get this output:
[per@baldrick exam]$ ls -la
total 32
drwxr-xr-x 2 per students 4096 Nov 24 08:59 .
drwx------ 5 per students 4096 Nov 24 08:42 ..
-rwxr-xr-x 1 per students 103 Nov 24 08:59 .login
-rwxr-xr-x 1 per students 11786 Nov 24 08:43 mytest
-r--rw-rw- 1 per students 129 Nov 24 08:43 mytest.c
-rw-rw-r-- 1 kari students 334 Nov 24 08:43 readme.txt
By inspecting the output you should answer the questions below. Remember to
explain your answers.
a) Can the user per edit the file readme.txt?
b) Can the user per edit the file mytest.c?
c) Can the user kari run the program mytest?
d) Which files are copied if the user per runs the command
cp * ..
e) If the user kari has her home directory as current directory and tries the command
cp ~per/exam/* .
Which files will be copied?
Mina svar :
a. ja, borde gå. Per är ju med i gruppen "students" som har läs och skrivrättigheter.
b. Lite osäker här. Bara läsrättigheter på mytest.c för användarel, men samtidigt har ju gruppen som per är med i läs och skrivrättigheter.
c. Ja borde gå.
d. Gissar på login och mytest.
e. Gissar mytest.
Nu får ni rätta mig om jag har fel, ge gärna en kort förklaring oxå.
Tack på förhand!
Håller på med lite uppgifter, skulle behöva lite hjälp på traven så att säga.
7. User per has logged in and opened the directory exam in his home directory. He gives
the command ls -al to get this output:
[per@baldrick exam]$ ls -la
total 32
drwxr-xr-x 2 per students 4096 Nov 24 08:59 .
drwx------ 5 per students 4096 Nov 24 08:42 ..
-rwxr-xr-x 1 per students 103 Nov 24 08:59 .login
-rwxr-xr-x 1 per students 11786 Nov 24 08:43 mytest
-r--rw-rw- 1 per students 129 Nov 24 08:43 mytest.c
-rw-rw-r-- 1 kari students 334 Nov 24 08:43 readme.txt
By inspecting the output you should answer the questions below. Remember to
explain your answers.
a) Can the user per edit the file readme.txt?
b) Can the user per edit the file mytest.c?
c) Can the user kari run the program mytest?
d) Which files are copied if the user per runs the command
cp * ..
e) If the user kari has her home directory as current directory and tries the command
cp ~per/exam/* .
Which files will be copied?
Mina svar :
a. ja, borde gå. Per är ju med i gruppen "students" som har läs och skrivrättigheter.
b. Lite osäker här. Bara läsrättigheter på mytest.c för användarel, men samtidigt har ju gruppen som per är med i läs och skrivrättigheter.
c. Ja borde gå.
d. Gissar på login och mytest.
e. Gissar mytest.
Nu får ni rätta mig om jag har fel, ge gärna en kort förklaring oxå.
Tack på förhand!
) och det smartaste kom jag fram till blir att köra
)