| /l3/users/bas/2011-03/linux2.unix.bas/user :1 :2 :3 |
|
|
$ls -l /tmp/D2/dir
total 0 ?--------- ? ? ? ? ? FILE |
|
$cat /tmp/D2/dir/FILE
cat: /tmp/D2/dir/FILE: Permission denied |
|
$ls -l /tmp/D2/dir
total 0 ?--------- ? ? ? ? ? FILE ?--------- ? ? ? ? ? FILE1 ?--------- ? ? ? ? ? FILE2 ?--------- ? ? ? ? ? FILE3 ?--------- ? ? ? ? ? FILE4 |
|
$ls -li /tmp/D2/dir
total 0 ??--------- ? ? ? ? ? FILE ??--------- ? ? ? ? ? FILE1 ??--------- ? ? ? ? ? FILE2 ??--------- ? ? ? ? ? FILE3 ??--------- ? ? ? ? ? FILE4 |
|
$ls -l /tmp/D2/dir/FILE1
-rw-r--r-- 1 root root 7 Mar 29 15:05 /tmp/D2/dir/FILE1 |
|
$cat /tmp/D2/dir/FILE1
secret |
|
$touch /tmp/d
|
|
$mkdir /tmp/D
|
|
$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 |
|
$grep umask /etc/bashrc
umask 002
umask 022
|
|
$pstr
pstree pstree.x11 pstruct |
|
$pstree | less
|
|
$umask 077
|
|
$touch /tmp/U1
|
|
$ls -l /tmp/U1
-rw------- 1 user user 0 Mar 29 15:16 /tmp/U1 |
|
$chown root /tmp/FFF
chown: changing ownership of `/tmp/FFF': Operation not permitted |
|
$chgrp audio /tmp/FFF
|
|
$chown :lp /tmp/FFF
chown: changing group of `/tmp/FFF': Operation not permitted |
|
$chgrp lp /tmp/FFF
chgrp: changing group of `/tmp/FFF': Operation not permitted |
|
$ls -l /tmp/FFF
-rw-rw-r-- 1 user audio 0 Mar 29 15:27 /tmp/FFF |
|
$id
uid=500(user) gid=500(user) groups=63(audio),500(user) |
|
$chgrp user /tmp/FFF
|
|
$ls -l /tmp/FFF
-rw-rw-r-- 1 user user 0 Mar 29 15:27 /tmp/FFF |
|
$chown :audio /tmp/FFF
|
|
$newgrp audio
Password: Sorry. |
|
$id
uid=500(user) gid=500(user) groups=63(audio),500(user) |
|
$ls -l /etc/passwd
-rw-r--r-- 1 root root 1636 Mar 29 13:20 /etc/passwd |
|
$hello world!
bash: hello: command not found |
|
$# hello world!
|
|
$echo hello world!
hello world! |
|
$# echo hello world! > file1
|
|
$echo hello world! > file1
bash: file1: Permission denied |
|
$cd /tmp
|
|
$echo hello world! > file1
|
|
$less file1
|
|
|