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

Содержание

Журнал

Четверг (10/18/18)

/dev/pts/0
14:19:11
#groupadd developers

/dev/pts/1
14:19:11
#groupadd developers

/dev/pts/0
14:19:43
#cat /etc/group
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:
tty:x:5:
disk:x:6:
lp:x:7:
mail:x:8:
news:x:9:
...
users:x:100:
nogroup:x:65534:
libuuid:x:101:
crontab:x:102:
Debian-exim:x:103:
ssh:x:104:
user:x:1000:
ivan:x:1001:
petr:x:1002:
developers:x:1003:
/dev/pts/1
14:19:43
#cat /etc/group
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:
tty:x:5:
disk:x:6:
lp:x:7:
mail:x:8:
news:x:9:
...
users:x:100:
nogroup:x:65534:
libuuid:x:101:
crontab:x:102:
Debian-exim:x:103:
ssh:x:104:
user:x:1000:
ivan:x:1001:
petr:x:1002:
developers:x:1003:
/dev/pts/0
14:19:45
#gpasswd -M ivan,petr developers

/dev/pts/1
14:19:45
#gpasswd -M ivan,petr developers

/dev/pts/0
14:22:09
#id ivan
uid=1001(ivan) gid=1001(ivan) groups=1001(ivan),1003(developers)
/dev/pts/1
14:22:09
#id ivan
uid=1001(ivan) gid=1001(ivan) groups=1001(ivan),1003(developers)
/dev/pts/0
14:23:02
#cat /etc/gshadow
root:*::
daemon:*::
bin:*::
sys:*::
adm:*::
tty:*::
disk:*::
lp:*::
mail:*::
news:*::
...
users:*::
nogroup:*::
libuuid:!::
crontab:!::
Debian-exim:!::
ssh:!::
user:!::
ivan:!::
petr:!::
developers:!::ivan,petr
/dev/pts/1
14:23:02
#cat /etc/gshadow
root:*::
daemon:*::
bin:*::
sys:*::
adm:*::
tty:*::
disk:*::
lp:*::
mail:*::
news:*::
...
users:*::
nogroup:*::
libuuid:!::
crontab:!::
Debian-exim:!::
ssh:!::
user:!::
ivan:!::
petr:!::
developers:!::ivan,petr
/dev/pts/0
14:24:42
#chattr +a ~ivan/my
chattr: No such file or directory while trying to stat /home/ivan/my
/dev/pts/1
14:24:42
#chattr +a ~ivan/my
chattr: No such file or directory while trying to stat /home/ivan/my
прошло 24 минуты
/dev/pts/0
14:49:24
#chattr +a ~ivan/MY

/dev/pts/1
14:49:24
#chattr +a ~ivan/MY

/dev/pts/0
14:49:31
#lsattr ~ivan/MY
-----a-------e-- /home/ivan/MY
/dev/pts/1
14:49:31
#lsattr ~ivan/MY
-----a-------e-- /home/ivan/MY
/dev/pts/0
14:49:46
#apt-get install acl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  acl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 70.8 kB of archives.
After this operation, 264 kB of additional disk space will be used.
Get:1 http://ftp.ua.debian.org/debian/ wheezy/main acl amd64 2.2.51-8 [70.8 kB]
Fetched 70.8 kB in 0s (584 kB/s)
Selecting previously unselected package acl.
(Reading database ... 28850 files and directories currently installed.)
Unpacking acl (from .../acl_2.2.51-8_amd64.deb) ...
Processing triggers for man-db ...
Setting up acl (2.2.51-8) ...
/dev/pts/1
14:49:46
#apt-get install acl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  acl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 70.8 kB of archives.
After this operation, 264 kB of additional disk space will be used.
Get:1 http://ftp.ua.debian.org/debian/ wheezy/main acl amd64 2.2.51-8 [70.8 kB]
Fetched 70.8 kB in 0s (584 kB/s)
Selecting previously unselected package acl.
(Reading database ... 28850 files and directories currently installed.)
Unpacking acl (from .../acl_2.2.51-8_amd64.deb) ...
Processing triggers for man-db ...
Setting up acl (2.2.51-8) ...
/dev/pts/0
14:59:26
#mkdir /opt/project

/dev/pts/1
14:59:26
#mkdir /opt/project

/dev/pts/0
15:00:07
#cd /opt/

/dev/pts/1
15:00:07
#cd /opt/

/dev/pts/0
15:00:13
#ls -l
total 4
drwxr-xr-x 2 root root 4096 Oct 18 16:00 project
/dev/pts/1
15:00:13
#ls -l
total 4
drwxr-xr-x 2 root root 4096 Oct 18 16:00 project
/dev/pts/0
15:00:16
#chgrp developers project

/dev/pts/1
15:00:16
#chgrp developers project

/dev/pts/0
15:01:30
#chmod 770 project/

/dev/pts/1
15:01:30
#chmod 770 project/

15:02:53
#ls -l
total 4
drwxrwx--- 2 root developers 4096 Oct 18 16:00 project
/dev/pts/0
15:02:53
#ls -l
total 4
drwxrwx--- 2 root developers 4096 Oct 18 16:00 project
15:02:55
#setfacl -m user:user:r project/

/dev/pts/1
15:02:55
#setfacl -m user:user:r project/

/dev/pts/0
15:05:11
#ls -l
total 4
drwxrwx---+ 2 root developers 4096 Oct 18 16:00 project
/dev/pts/1
15:05:11
#ls -l
total 4
drwxrwx---+ 2 root developers 4096 Oct 18 16:00 project
/dev/pts/0
15:05:49
#getfacl project/
# file: project/
# owner: root
# group: developers
user::rwx
user:user:r--
group::rwx
mask::rwx
other::---
/dev/pts/1
15:05:49
#getfacl project/
# file: project/
# owner: root
# group: developers
user::rwx
user:user:r--
group::rwx
mask::rwx
other::---
/dev/pts/0
15:06:26
#mkdir public

/dev/pts/1
15:06:26
#mkdir public

/dev/pts/0
15:09:35
#chmod 777 public/

/dev/pts/1
15:09:35
#chmod 777 public/

/dev/pts/0
15:09:53
#cd public/

/dev/pts/1
15:09:53
#cd public/

/dev/pts/0
15:10:15
#ls

/dev/pts/1
15:10:15
#ls

/dev/pts/0
15:10:20
#touch ROOT

/dev/pts/1
15:10:20
#touch ROOT

/dev/pts/0
15:10:26
#ls -l
total 0
-rw-r--r-- 1 root root 0 Oct 18 16:10 ROOT
/dev/pts/1
15:10:26
#ls -l
total 0
-rw-r--r-- 1 root root 0 Oct 18 16:10 ROOT
/dev/pts/0
15:10:29
#chmod +t ..

/dev/pts/1
15:10:29
#chmod +t ..

/dev/pts/0
15:13:27
#touch ROOT

/dev/pts/1
15:13:27
#touch ROOT

/dev/pts/0
15:13:32
#ls -ld ..
drwxr-xr-t 4 root root 4096 Oct 18 16:09 ..
/dev/pts/1
15:13:32
#ls -ld ..
drwxr-xr-t 4 root root 4096 Oct 18 16:09 ..
/dev/pts/0
15:13:57
#ls -l ..
total 8
drwxrwx---+ 2 root developers 4096 Oct 18 16:00 project
drwxrwxrwx  2 root root       4096 Oct 18 16:13 public
/dev/pts/1
15:13:57
#ls -l ..
total 8
drwxrwx---+ 2 root developers 4096 Oct 18 16:00 project
drwxrwxrwx  2 root root       4096 Oct 18 16:13 public
/dev/pts/0
15:14:00
#ls -ld ..
drwxr-xr