Журнал лабораторных работ

Содержание

Журнал

Вторник (03/29/11)

/dev/pts/6
11:03:26
$ls /tmp/D2/dir
FILE
11:03:31
$ls -l /tmp/D2/dir
total 0
?--------- ? ? ? ?            ? FILE
11:03:51
$cat /tmp/D2/dir/FILE
cat: /tmp/D2/dir/FILE: Permission denied
/dev/pts/6
11:04:37
$ls -l /tmp/D2/dir
total 0
?--------- ? ? ? ?            ? FILE
?--------- ? ? ? ?            ? FILE1
?--------- ? ? ? ?            ? FILE2
?--------- ? ? ? ?            ? FILE3
?--------- ? ? ? ?            ? FILE4
11:04:39
$ls -li /tmp/D2/dir
total 0
??--------- ? ? ? ?            ? FILE
??--------- ? ? ? ?            ? FILE1
??--------- ? ? ? ?            ? FILE2
??--------- ? ? ? ?            ? FILE3
??--------- ? ? ? ?            ? FILE4
/dev/pts/6
11:05:29
$ls -l /tmp/D2/dir
ls: /tmp/D2/dir: Permission denied
11:05:33
$ls -l /tmp/D2/dir/FILE1
-rw-r--r-- 1 root root 7 Mar 29 15:05 /tmp/D2/dir/FILE1
11:05:37
$cat /tmp/D2/dir/FILE1
secret
11:08:18
$touch /tmp/d

11:09:11
$mkdir /tmp/D

11:09:16
$ls -ld /tmp/D /tmp/d
-rw-rw-r-- 1 user user    0 Mar 29 15:09 /tmp/d
drwxrwxr-x 2 user user 4096 Mar 29 15:09 /tmp/D
11:09:21
$grep umask /etc/bashrc
        umask 002
        umask 022
11:12:26
$pstr
pstree      pstree.x11  pstruct
11:12:26
$pstree | less
11:15:32
$umask 077

11:16:45
$touch /tmp/U1

11:16:48
$ls -l /tmp/U1
-rw------- 1 user user 0 Mar 29 15:16 /tmp/U1
прошло 10 минут
/dev/pts/6
11:27:22
$touch /tmp/FFF

11:27:25
$chown root /tmp/FFF
chown: changing ownership of `/tmp/FFF': Operation not permitted
11:27:32
$chgrp audio /tmp/FFF

11:27:38
$chown :lp /tmp/FFF
chown: changing group of `/tmp/FFF': Operation not permitted
11:27:51
$chgrp lp /tmp/FFF
chgrp: changing group of `/tmp/FFF': Operation not permitted
11:28:00
$ls -l /tmp/FFF
-rw-rw-r-- 1 user audio 0 Mar 29 15:27 /tmp/FFF
11:28:07
$id
uid=500(user) gid=500(user) groups=63(audio),500(user)
11:28:23
$chgrp user /tmp/FFF

11:28:45
$ls -l /tmp/FFF
-rw-rw-r-- 1 user user 0 Mar 29 15:27 /tmp/FFF
11:28:47
$chown :audio /tmp/FFF

11:29:00
$newgrp audio
Password:
Sorry.
11:29:53
$id
uid=500(user) gid=500(user) groups=63(audio),500(user)
11:30:17
$ls -l /etc/passwd
-rw-r--r-- 1 root root 1636 Mar 29 13:20 /etc/passwd
прошло 59 минут
12:29:57
$hello world!
bash: hello: command not found
12:30:06
$# hello world!

12:30:15
$echo hello world!
hello world!
12:30:31
$# echo hello world! > file1

12:31:25
$echo hello world! > file1
bash: file1: Permission denied
12:31:34
$cd /tmp

12:31:42
$echo hello world! > file1

12:31:43
$less file1
12:31:55