Linux vmi2545633.contaboserver.net 6.1.0-32-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.129-1 (2025-03-06) x86_64
Apache/2.4.62 (Debian)
Server IP : 127.0.0.1 & Your IP : 127.0.0.1
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
sbin /
Delete
Unzip
Name
Size
Permission
Date
Action
a2disconf
15.86
KB
-rwxr-xr-x
2024-10-04 15:16
a2dismod
15.86
KB
-rwxr-xr-x
2024-10-04 15:16
a2dissite
15.86
KB
-rwxr-xr-x
2024-10-04 15:16
a2enconf
15.86
KB
-rwxr-xr-x
2024-10-04 15:16
a2enmod
15.86
KB
-rwxr-xr-x
2024-10-04 15:16
a2ensite
15.86
KB
-rwxr-xr-x
2024-10-04 15:16
a2query
9.6
KB
-rwxr-xr-x
2024-10-04 15:21
aa-remove-unknown
3.13
KB
-rwxr-xr-x
2023-02-14 11:49
aa-status
38.3
KB
-rwxr-xr-x
2023-02-14 11:49
aa-teardown
137
B
-rwxr-xr-x
2022-11-22 00:54
accessdb
14.46
KB
-rwxr-xr-x
2023-03-12 22:23
add-shell
1.03
KB
-rwxr-xr-x
2023-07-28 23:46
addgnupghome
3
KB
-rwxr-xr-x
2023-03-26 13:03
addgroup
47.25
KB
-rwxr-xr-x
2023-05-25 15:54
adduser
47.25
KB
-rwxr-xr-x
2023-05-25 15:54
agetty
67.49
KB
-rwxr-xr-x
2024-11-21 20:01
apache2
712.5
KB
-rwxr-xr-x
2024-10-04 15:21
apache2ctl
7.19
KB
-rwxr-xr-x
2024-10-04 15:16
apachectl
7.19
KB
-rwxr-xr-x
2024-10-04 15:16
apparmor_parser
1.39
MB
-rwxr-xr-x
2023-02-14 11:49
apparmor_status
38.3
KB
-rwxr-xr-x
2023-02-14 11:49
applygnupgdefaults
2.17
KB
-rwxr-xr-x
2023-03-26 13:03
arpd
104.48
KB
-rwxr-xr-x
2023-05-22 13:19
arptables
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
arptables-nft
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
arptables-nft-restore
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
arptables-nft-save
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
arptables-restore
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
arptables-save
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
aspell-autobuildhash
13.36
KB
-rwxr-xr-x
2023-03-14 21:17
badblocks
34.25
KB
-rwxr-xr-x
2023-03-05 03:16
biosdecode
27.13
KB
-rwxr-xr-x
2022-06-30 18:37
blkdeactivate
15.96
KB
-rwxr-xr-x
2022-10-19 19:37
blkdiscard
34.31
KB
-rwxr-xr-x
2024-11-21 20:01
blkid
122.34
KB
-rwxr-xr-x
2024-11-21 20:01
blkzone
78.31
KB
-rwxr-xr-x
2024-11-21 20:01
blockdev
78.31
KB
-rwxr-xr-x
2024-11-21 20:01
bridge
152.54
KB
-rwxr-xr-x
2023-05-22 13:19
capsh
53.29
KB
-rwxr-xr-x
2023-05-15 18:34
cfdisk
106.66
KB
-rwxr-xr-x
2024-11-21 20:01
chcpu
46.3
KB
-rwxr-xr-x
2024-11-21 20:01
check_forensic
952
B
-rwxr-xr-x
2011-04-26 15:10
chgpasswd
66.29
KB
-rwxr-xr-x
2023-03-23 12:40
chmem
66.31
KB
-rwxr-xr-x
2024-11-21 20:01
chpasswd
62.36
KB
-rwxr-xr-x
2023-03-23 12:40
chroot
46.98
KB
-rwxr-xr-x
2022-09-20 15:27
cpgr
60.43
KB
-rwxr-xr-x
2023-03-23 12:40
cppw
60.43
KB
-rwxr-xr-x
2023-03-23 12:40
cron
50.56
KB
-rwxr-xr-x
2023-03-02 07:33
ctrlaltdel
38.3
KB
-rwxr-xr-x
2024-11-21 20:01
dcb
144.6
KB
-rwxr-xr-x
2023-05-22 13:19
debugfs
233.83
KB
-rwxr-xr-x
2023-03-05 03:16
delgroup
16.33
KB
-rwxr-xr-x
2023-05-25 15:54
deluser
16.33
KB
-rwxr-xr-x
2023-05-25 15:54
depmod
174.27
KB
-rwxr-xr-x
2022-12-10 00:02
devlink
220.98
KB
-rwxr-xr-x
2023-05-22 13:19
dhclient
2.63
MB
-rwxr-xr-x
2023-04-17 12:20
dhclient-script
14.21
KB
-rwxr-xr-x
2023-04-17 12:20
discover
23.23
KB
-rwxr-xr-x
2022-01-09 07:48
discover-modprobe
4.9
KB
-rwxr-xr-x
2022-01-09 07:48
discover-pkginstall
5.66
KB
-rwxr-xr-x
2022-01-09 07:48
dmidecode
127.16
KB
-rwxr-xr-x
2022-06-30 18:37
dmsetup
166.98
KB
-rwxr-xr-x
2022-10-19 19:37
dmstats
166.98
KB
-rwxr-xr-x
2022-10-19 19:37
dpkg-fsys-usrunmess
16.99
KB
-rwxr-xr-x
2023-05-11 02:04
dpkg-preconfigure
3.83
KB
-rwxr-xr-x
2023-01-08 21:50
dpkg-reconfigure
4.38
KB
-rwxr-xr-x
2023-01-08 21:50
dumpe2fs
30.31
KB
-rwxr-xr-x
2023-03-05 03:16
e2freefrag
14.3
KB
-rwxr-xr-x
2023-03-05 03:16
e2fsck
348.27
KB
-rwxr-xr-x
2023-03-05 03:16
e2image
54.45
KB
-rwxr-xr-x
2023-03-05 03:16
e2label
114.52
KB
-rwxr-xr-x
2023-03-05 03:16
e2mmpstatus
30.31
KB
-rwxr-xr-x
2023-03-05 03:16
e2scrub
7.12
KB
-rwxr-xr-x
2023-03-05 03:16
e2scrub_all
5.27
KB
-rwxr-xr-x
2023-03-05 03:16
e2undo
22.3
KB
-rwxr-xr-x
2023-03-05 03:16
e4crypt
26.3
KB
-rwxr-xr-x
2023-03-05 03:16
e4defrag
30.23
KB
-rwxr-xr-x
2023-03-05 03:16
ebtables
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ebtables-nft
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ebtables-nft-restore
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ebtables-nft-save
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ebtables-restore
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ebtables-save
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ebtables-translate
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
faillock
14.24
KB
-rwxr-xr-x
2023-09-21 20:55
fdisk
158.35
KB
-rwxr-xr-x
2024-11-21 20:01
filefrag
18.26
KB
-rwxr-xr-x
2023-03-05 03:16
findfs
14.3
KB
-rwxr-xr-x
2024-11-21 20:01
fsck
54.36
KB
-rwxr-xr-x
2024-11-21 20:01
fsck.cramfs
42.37
KB
-rwxr-xr-x
2024-11-21 20:01
fsck.ext2
348.27
KB
-rwxr-xr-x
2023-03-05 03:16
fsck.ext3
348.27
KB
-rwxr-xr-x
2023-03-05 03:16
fsck.ext4
348.27
KB
-rwxr-xr-x
2023-03-05 03:16
fsck.minix
122.34
KB
-rwxr-xr-x
2024-11-21 20:01
fsfreeze
14.3
KB
-rwxr-xr-x
2024-11-21 20:01
fstab-decode
14.23
KB
-rwxr-xr-x
2023-04-03 06:25
fstrim
74.31
KB
-rwxr-xr-x
2024-11-21 20:01
genl
116.51
KB
-rwxr-xr-x
2023-05-22 13:19
getcap
14.23
KB
-rwxr-xr-x
2023-05-15 18:34
getpcaps
14.23
KB
-rwxr-xr-x
2023-05-15 18:34
getty
67.49
KB
-rwxr-xr-x
2024-11-21 20:01
groupadd
99.04
KB
-rwxr-xr-x
2023-03-23 12:40
groupdel
90.85
KB
-rwxr-xr-x
2023-03-23 12:40
groupmems
66.33
KB
-rwxr-xr-x
2023-03-23 12:40
groupmod
99.01
KB
-rwxr-xr-x
2023-03-23 12:40
grpck
66.3
KB
-rwxr-xr-x
2023-03-23 12:40
grpconv
58.14
KB
-rwxr-xr-x
2023-03-23 12:40
grpunconv
58.14
KB
-rwxr-xr-x
2023-03-23 12:40
grub-bios-setup
934.42
KB
-rwxr-xr-x
2023-10-02 14:11
grub-install
1.14
MB
-rwxr-xr-x
2023-10-02 14:11
grub-macbless
922.26
KB
-rwxr-xr-x
2023-10-02 14:11
grub-mkconfig
8.46
KB
-rwxr-xr-x
2023-10-02 14:11
grub-mkdevicemap
216.7
KB
-rwxr-xr-x
2023-10-02 14:11
grub-probe
934.57
KB
-rwxr-xr-x
2023-10-02 14:11
grub-reboot
4.73
KB
-rwxr-xr-x
2023-10-02 14:11
grub-set-default
3.47
KB
-rwxr-xr-x
2023-10-02 14:11
halt
1.29
MB
-rwxr-xr-x
2025-03-06 14:56
httxt2dbm
14.23
KB
-rwxr-xr-x
2024-10-04 15:21
hwclock
86.44
KB
-rwxr-xr-x
2024-11-21 20:01
iconvconfig
30.84
KB
-rwxr-xr-x
2025-03-06 22:46
ifdown
86.16
KB
-rwxr-xr-x
2023-01-24 13:07
ifquery
86.16
KB
-rwxr-xr-x
2023-01-24 13:07
ifup
86.16
KB
-rwxr-xr-x
2023-01-24 13:07
init
90.38
KB
-rwxr-xr-x
2025-03-06 14:56
insmod
174.27
KB
-rwxr-xr-x
2022-12-10 00:02
install-sgmlcatalog
4.44
KB
-rwxr-xr-x
2022-10-06 18:03
installkernel
2.6
KB
-rwxr-xr-x
2023-07-28 23:46
invoke-rc.d
16.13
KB
-rwxr-xr-x
2022-07-02 15:23
ip
674.82
KB
-rwxr-xr-x
2023-05-22 13:19
ip6tables
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ip6tables-apply
6.87
KB
-rwxr-xr-x
2023-01-12 10:27
ip6tables-legacy
88.98
KB
-rwxr-xr-x
2023-01-16 13:44
ip6tables-legacy-restore
88.98
KB
-rwxr-xr-x
2023-01-16 13:44
ip6tables-legacy-save
88.98
KB
-rwxr-xr-x
2023-01-16 13:44
ip6tables-nft
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ip6tables-nft-restore
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ip6tables-nft-save
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ip6tables-restore
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ip6tables-restore-translate
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ip6tables-save
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ip6tables-translate
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
iptables
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
iptables-apply
6.87
KB
-rwxr-xr-x
2023-01-12 10:27
iptables-legacy
88.98
KB
-rwxr-xr-x
2023-01-16 13:44
iptables-legacy-restore
88.98
KB
-rwxr-xr-x
2023-01-16 13:44
iptables-legacy-save
88.98
KB
-rwxr-xr-x
2023-01-16 13:44
iptables-nft
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
iptables-nft-restore
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
iptables-nft-save
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
iptables-restore
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
iptables-restore-translate
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
iptables-save
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
iptables-translate
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
isosize
30.31
KB
-rwxr-xr-x
2024-11-21 20:01
ispell-autobuildhash
15.52
KB
-rwxr-xr-x
2023-03-14 21:17
iucode-tool
58.26
KB
-rwxr-xr-x
2023-02-17 19:51
iucode_tool
58.26
KB
-rwxr-xr-x
2023-02-17 19:51
kbdrate
14.52
KB
-rwxr-xr-x
2023-03-23 09:34
killall5
26.31
KB
-rwxr-xr-x
2023-04-03 06:25
ldattach
34.31
KB
-rwxr-xr-x
2024-11-21 20:01
ldconfig
959.84
KB
-rwxr-xr-x
2025-03-06 22:46
locale-gen
1.38
KB
-rwxr-xr-x
2025-03-06 22:46
logrotate
98.16
KB
-rwxr-xr-x
2022-12-14 18:16
logsave
14.09
KB
-rwxr-xr-x
2023-03-05 03:16
losetup
114.42
KB
-rwxr-xr-x
2024-11-21 20:01
lsmod
174.27
KB
-rwxr-xr-x
2022-12-10 00:02
make-ssl-cert
6.65
KB
-rwxr-xr-x
2021-12-30 16:52
mariadbd
25.77
MB
-rwxr-xr-x
2025-02-19 00:56
mke2fs
138.58
KB
-rwxr-xr-x
2023-03-05 03:16
mkfs
14.3
KB
-rwxr-xr-x
2024-11-21 20:01
mkfs.bfs
34.31
KB
-rwxr-xr-x
2024-11-21 20:01
mkfs.cramfs
42.24
KB
-rwxr-xr-x
2024-11-21 20:01
mkfs.ext2
138.58
KB
-rwxr-xr-x
2023-03-05 03:16
mkfs.ext3
138.58
KB
-rwxr-xr-x
2023-03-05 03:16
mkfs.ext4
138.58
KB
-rwxr-xr-x
2023-03-05 03:16
mkfs.minix
110.32
KB
-rwxr-xr-x
2024-11-21 20:01
mkhomedir_helper
22.27
KB
-rwxr-xr-x
2023-09-21 20:55
mkinitramfs
12.4
KB
-rwxr-xr-x
2024-08-24 23:14
mklost+found
14.23
KB
-rwxr-xr-x
2023-03-05 03:16
mkswap
114.31
KB
-rwxr-xr-x
2024-11-21 20:01
modinfo
174.27
KB
-rwxr-xr-x
2022-12-10 00:02
modprobe
174.27
KB
-rwxr-xr-x
2022-12-10 00:02
mysqld
25.77
MB
-rwxr-xr-x
2025-02-19 00:56
newusers
102.92
KB
-rwxr-xr-x
2023-03-23 12:40
nfnl_osf
18.23
KB
-rwxr-xr-x
2023-01-16 13:44
nft
26.15
KB
-rwxr-xr-x
2023-09-16 05:47
nginx
1.2
MB
-rwxr-xr-x
2025-02-17 19:40
nologin
14.23
KB
-rwxr-xr-x
2023-03-23 12:40
ownership
14.38
KB
-rwxr-xr-x
2022-06-30 18:37
pam-auth-update
20.79
KB
-rwxr-xr-x
2023-09-21 20:55
pam_getenv
2.82
KB
-rwxr-xr-x
2023-09-21 20:55
pam_namespace_helper
467
B
-rwxr-xr-x
2023-09-21 20:55
pam_timestamp_check
14.24
KB
-rwxr-xr-x
2023-09-21 20:55
php-fpm8.4
5.68
MB
-rwxr-xr-x
2025-10-01 20:26
phpdismod
7.11
KB
-rwxr-xr-x
2025-03-09 16:33
phpenmod
7.11
KB
-rwxr-xr-x
2025-03-09 16:33
phpquery
6.24
KB
-rwxr-xr-x
2025-03-09 16:33
pivot_root
14.3
KB
-rwxr-xr-x
2024-11-21 20:01
poweroff
1.29
MB
-rwxr-xr-x
2025-03-06 14:56
pwck
58.26
KB
-rwxr-xr-x
2023-03-23 12:40
pwconv
54.13
KB
-rwxr-xr-x
2023-03-23 12:40
pwhistory_helper
18.24
KB
-rwxr-xr-x
2023-09-21 20:55
pwunconv
54.17
KB
-rwxr-xr-x
2023-03-23 12:40
qemu-ga
985.25
KB
-rwxr-xr-x
2025-01-04 14:47
readprofile
34.34
KB
-rwxr-xr-x
2024-11-21 20:01
reboot
1.29
MB
-rwxr-xr-x
2025-03-06 14:56
remove-default-ispell
2.86
KB
-rwxr-xr-x
2023-03-14 21:17
remove-default-wordlist
2.86
KB
-rwxr-xr-x
2023-03-14 21:17
remove-shell
1.08
KB
-rwxr-xr-x
2023-07-28 23:46
resize2fs
62.3
KB
-rwxr-xr-x
2023-03-05 03:16
rmmod
174.27
KB
-rwxr-xr-x
2022-12-10 00:02
rmt
59.02
KB
-rwxr-xr-x
2024-01-20 09:27
rmt-tar
59.02
KB
-rwxr-xr-x
2024-01-20 09:27
rtacct
44.37
KB
-rwxr-xr-x
2023-05-22 13:19
rtcwake
46.31
KB
-rwxr-xr-x
2024-11-21 20:01
rtmon
112.45
KB
-rwxr-xr-x
2023-05-22 13:19
runlevel
1.29
MB
-rwxr-xr-x
2025-03-06 14:56
runuser
70.31
KB
-rwxr-xr-x
2024-11-21 20:01
select-default-ispell
3.23
KB
-rwxr-xr-x
2023-03-14 21:17
select-default-wordlist
3.21
KB
-rwxr-xr-x
2023-03-14 21:17
service
8.89
KB
-rwxr-xr-x
2022-09-18 01:53
setcap
14.23
KB
-rwxr-xr-x
2023-05-15 18:34
setvesablank
14.51
KB
-rwxr-xr-x
2023-03-23 09:34
sfdisk
142.3
KB
-rwxr-xr-x
2024-11-21 20:01
shadowconfig
2.22
KB
-rwxr-xr-x
2022-11-11 08:28
shutdown
1.29
MB
-rwxr-xr-x
2025-03-06 14:56
split-logfile
2.36
KB
-rwxr-xr-x
2024-10-04 15:21
sshd
1.21
MB
-rwxr-xr-x
2025-02-14 13:06
start-stop-daemon
43.42
KB
-rwxr-xr-x
2023-05-11 02:04
sudo_logsrvd
244.57
KB
-rwxr-xr-x
2023-06-27 11:45
sudo_sendlog
151.41
KB
-rwxr-xr-x
2023-06-27 11:45
sulogin
54.31
KB
-rwxr-xr-x
2024-11-21 20:01
swaplabel
18.3
KB
-rwxr-xr-x
2024-11-21 20:01
swapoff
22.3
KB
-rwxr-xr-x
2024-11-21 20:01
swapon
50.3
KB
-rwxr-xr-x
2024-11-21 20:01
switch_root
18.3
KB
-rwxr-xr-x
2024-11-21 20:01
sysctl
30.31
KB
-rwxr-xr-x
2022-12-19 06:06
tarcat
936
B
-rwxr-xr-x
2024-01-20 09:27
tc
574
KB
-rwxr-xr-x
2023-05-22 13:19
tcptraceroute
1.56
KB
-rwxr-xr-x
2023-02-25 12:24
tcptraceroute.db
1.56
KB
-rwxr-xr-x
2023-02-25 12:24
telinit
1.29
MB
-rwxr-xr-x
2025-03-06 14:56
tipc
152.6
KB
-rwxr-xr-x
2023-05-22 13:19
traceroute
71.23
KB
-rwxr-xr-x
2023-02-25 12:24
tune2fs
114.52
KB
-rwxr-xr-x
2023-03-05 03:16
ufw
4.84
KB
-rwxr-xr-x
2023-05-18 14:03
unix_chkpwd
38.24
KB
-rwxr-sr-x
2023-09-21 20:55
unix_update
38.24
KB
-rwxr-xr-x
2023-09-21 20:55
update-ca-certificates
5.29
KB
-rwxr-xr-x
2023-03-11 08:47
update-catalog
9.17
KB
-rwxr-xr-x
2022-10-06 18:03
update-default-aspell
1
KB
-rwxr-xr-x
2023-03-14 21:17
update-default-ispell
9.68
KB
-rwxr-xr-x
2023-03-14 21:17
update-default-wordlist
7.5
KB
-rwxr-xr-x
2023-03-14 21:17
update-dictcommon-aspell
1
KB
-rwxr-xr-x
2023-03-14 21:17
update-dictcommon-hunspell
782
B
-rwxr-xr-x
2023-03-14 21:17
update-grub
64
B
-rwxr-xr-x
2023-10-02 14:11
update-grub2
64
B
-rwxr-xr-x
2023-10-02 14:11
update-initramfs
6.75
KB
-rwxr-xr-x
2024-08-22 19:30
update-locale
2.99
KB
-rwxr-xr-x
2025-03-06 22:46
update-mime
9.39
KB
-rwxr-xr-x
2021-11-29 13:07
update-passwd
38.49
KB
-rwxr-xr-x
2022-09-20 10:22
update-pciids
1.71
KB
-rwxr-xr-x
2023-01-17 23:50
update-rc.d
17.33
KB
-rwxr-xr-x
2022-07-02 15:23
update-shells
3.89
KB
-rwxr-xr-x
2023-07-28 23:46
update-xmlcatalog
16.88
KB
-rwxr-xr-x
2019-02-27 00:18
upgrade-from-grub-legacy
1.56
KB
-rwxr-xr-x
2023-10-02 14:11
useradd
155.8
KB
-rwxr-xr-x
2023-03-23 12:40
userdel
110.95
KB
-rwxr-xr-x
2023-03-23 12:40
usermod
143.61
KB
-rwxr-xr-x
2023-03-23 12:40
validlocale
1.73
KB
-rwxr-xr-x
2025-03-06 22:46
vcstime
14.38
KB
-rwxr-xr-x
2023-03-23 09:34
vdpa
116.66
KB
-rwxr-xr-x
2023-05-22 13:19
vigr
72.64
KB
-rwxr-xr-x
2023-03-23 12:40
vipw
72.64
KB
-rwxr-xr-x
2023-03-23 12:40
visudo
256.63
KB
-rwxr-xr-x
2023-06-27 11:45
vpddecode
14.51
KB
-rwxr-xr-x
2022-06-30 18:37
wipefs
46.31
KB
-rwxr-xr-x
2024-11-21 20:01
xtables-legacy-multi
88.98
KB
-rwxr-xr-x
2023-01-16 13:44
xtables-monitor
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
xtables-nft-multi
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
zic
58.73
KB
-rwxr-xr-x
2025-03-06 22:46
zramctl
114.42
KB
-rwxr-xr-x
2024-11-21 20:01
Save
Rename
#!/usr/bin/perl # # dpkg-fsys-usrunmess - Undoes the merged-/usr-via-aliased-dirs mess # # Copyright © 2020-2021 Guillem Jover <guillem@debian.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/> use strict; use warnings; use feature qw(state); our ($PROGNAME) = $0 =~ m{(?:.*/)?([^/]*)}; our $PROGVERSION = '1.21.22'; our $ADMINDIR = '/var/lib/dpkg'; use POSIX; use File::Temp qw(tempdir); use File::Find; use Getopt::Long qw(:config posix_default bundling_values no_ignorecase); eval q{ pop @INC if $INC[-1] eq '.'; use File::FcntlLock; }; if ($@) { fatal('missing File::FcntlLock module; please install libfile-fcntllock-perl'); } my $opt_noact = length $ENV{DPKG_USRUNMESS_NOACT} ? 1 : 0; my $opt_prompt = 0; my $opt_prevent = -1; my @options_spec = ( 'help|?' => sub { usage(); exit 0; }, 'version' => sub { version(); exit 0; }, 'dry-run|no-act|n' => \$opt_noact, 'prompt|p' => \$opt_prompt, 'prevention!' => \$opt_prevent, ); { local $SIG{__WARN__} = sub { usageerr($_[0]) }; GetOptions(@options_spec); } # Set a known umask. umask 0022; my @aliased_dirs; # # Scan all dirs under / and check whether any are aliased to /usr. # foreach my $path (glob '/*') { debug("checking symlink? $path"); next unless -l $path; debug("checking merged-usr symlink? $path"); my $symlink = readlink $path; next unless $symlink eq "usr$path" or $symlink eq "/usr$path"; debug("merged-usr breakage, queueing $path"); push @aliased_dirs, $path; } if (@aliased_dirs == 0) { print "System is fine, no aliased directories found, congrats!\n"; exit 0; } # # dpkg consistency checks # debug('checking dpkg database consistency'); system(qw(dpkg --audit)) == 0 or fatal("cannot audit the dpkg database: $!"); debug('checking whether dpkg has been interrupted'); if (glob "$ADMINDIR/updates/*") { fatal('dpkg is in an inconsistent state, please fix that'); } $opt_prevent = prompt('Generate and install a regression prevention package') if $opt_prevent < 0; if ($opt_prevent) { debug('building regression prevention measures'); my $tmpdir = tempdir(CLEANUP => 1, TMPDIR => 1); my $pkgdir = "$tmpdir/pkg"; my $pkgfile = "$tmpdir/dpkg-fsys-usrunmess.deb"; mkdir "$pkgdir" or fatal('cannot create temporary package directory'); mkdir "$pkgdir/DEBIAN" or fatal('cannot create temporary directory'); open my $ctrl_fh, '>', "$pkgdir/DEBIAN/control" or fatal('cannot create temporary control file'); print { $ctrl_fh } <<"CTRL"; Package: dpkg-fsys-usrunmess Version: $PROGVERSION Architecture: all Protected: yes Multi-Arch: foreign Section: admin Priority: optional Maintainer: Dpkg Developers <debian-dpkg\@lists.debian.org> Installed-Size: 5 Conflicts: usrmerge Provides: usrmerge (= 25) Replaces: usrmerge Description: prevention measure to avoid unsuspected filesystem breakage This package will prevent automatic migration of the filesystem to the broken merge-/usr-via-aliased-dirs via the usrmerge package. . This package was generated and installed by the dpkg-fsys-usrunmess(8) program. CTRL close $ctrl_fh or fatal('cannot write temporary control file'); system(('dpkg-deb', '-b', $pkgdir, $pkgfile)) == 0 or fatal('cannot create prevention package'); if (not $opt_noact) { system(('dpkg', '-GBi', $pkgfile)) == 0 or fatal('cannot install prevention package'); } } else { print "Will not generate and install a regression prevention package.\n"; } my $aliased_regex = '^(' . join('|', @aliased_dirs) . ')/'; # # Get a list of all paths (including diversion) under the aliased dirs. # my @search_args; my %aliased_pathnames; foreach my $dir (@aliased_dirs) { push @search_args, "$dir/*"; } # We also need to track /usr/lib/modules to then be able to compute its # complement when looking for untracked kernel module files under aliased # dirs. my %usr_mod_pathnames; push @search_args, '/usr/lib/modules/*'; open my $fh_paths, '-|', 'dpkg-query', '--search', @search_args or fatal("cannot execute dpkg-query --search: $!"); while (<$fh_paths>) { if (m/^diversion by [^ ]+ from: .*$/) { # Ignore. } elsif (m/^diversion by [^ ]+ to: (.*)$/) { if (-e $1) { add_pathname($1, 'diverted pathname'); } } elsif (m/^.*: (.*)$/) { add_pathname($1, 'pathname'); } } close $fh_paths; # # Get a list of all update-alternatives under the aliased dirs. # my @selections = qx(update-alternatives --get-selections); foreach my $selection (@selections) { my $name = (split(' ', $selection))[0]; my $slaves = 0; open my $fh_alts, '-|', 'update-alternatives', '--query', $name or fatal("cannot execute update-alternatives --query: $!"); while (<$fh_alts>) { if (m/^\s*$/) { last; } elsif (m/^Link: (.*)$/) { add_pathname($1, 'alternative link'); } elsif (m/^Slaves:\s*$/) { $slaves = 1; } elsif ($slaves and m/^\s\S+\s(\S+)$/) { add_pathname($1, 'alternative slave'); } else { $slaves = 0; } } close $fh_alts; } # # Unfortunately we need to special case untracked kernel module files, # as these are required for system booting. To reduce potentially moving # undesired non-kernel module files (such as apache, python or ruby ones), # we only look for sub-dirs starting with a digit, which should match for # both Linux and kFreeBSD modules, and also for the modprobe.conf filename. # find({ no_chdir => 1, wanted => sub { my $path = $_; if (exists $aliased_pathnames{$path}) { # Ignore pathname already handled. } elsif (exists $usr_mod_pathnames{"/usr$path"}) { # Ignore pathname owned elsewhere. } elsif ($path eq '/lib/modules' or $path eq '/lib/modules/modprobe.conf' or $path =~ m{^/lib/modules/[0-9]}) { add_pathname($path, 'untracked modules'); } }, }, '/lib/modules'); my $sroot = '/.usrunmess'; my @relabel; # # Create a shadow hierarchy under / for the new unmessed dir: # debug("creating shadow dir = $sroot"); mkdir $sroot or sysfatal("cannot create directory $sroot"); foreach my $dir (@aliased_dirs) { debug("creating shadow dir = $sroot$dir"); mkdir "$sroot$dir" or sysfatal("cannot create directory $sroot$dir"); chmod 0755, "$sroot$dir" or sysfatal("cannot chmod 0755 $sroot$dir"); chown 0, 0, "$sroot$dir" or sysfatal("cannot chown 0 0 $sroot$dir"); push @relabel, "$sroot$dir"; } # # Populate the split dirs with hardlinks or copies of the objects from # their counter-parts in /usr. # foreach my $pathname (sort keys %aliased_pathnames) { my (@meta) = lstat $pathname or sysfatal("cannot lstat object $pathname for shadow hierarchy"); if (-d _) { my $mode = $meta[2]; my ($uid, $gid) = @meta[4, 5]; my ($atime, $mtime, $ctime) = @meta[8, 9, 10]; debug("creating shadow dir = $sroot$pathname"); mkdir "$sroot$pathname" or sysfatal("cannot mkdir $sroot$pathname"); chmod $mode, "$sroot$pathname" or sysfatal("cannot chmod $mode $sroot$pathname"); chown $uid, $gid, "$sroot$pathname" or sysfatal("cannot chown $uid $gid $sroot$pathname"); utime $atime, $mtime, "$sroot$pathname" or sysfatal("cannot utime $atime $mtime $sroot$pathname"); push @relabel, "$sroot$pathname"; } elsif (-f _) { debug("creating shadow file = $sroot$pathname"); copy("/usr$pathname", "$sroot$pathname"); } elsif (-l _) { my $target = readlink "/usr$pathname"; debug("creating shadow symlink = $sroot$pathname"); symlink $target, "$sroot$pathname" or sysfatal("cannot symlink $target to $sroot$pathname"); push @relabel, "$sroot$pathname"; } else { fatal("unhandled object type for '$pathname'"); } } # # Prompt at the point of no return, if the user requested it. # if ($opt_prompt) { if (!prompt("Shadow hierarchy created at '$sroot', ready to proceed")) { print "Aborting migration, shadow hierarchy left in place.\n"; exit 0; } } # # Mark all packages as half-configured so that we can force a mass # reconfiguration, to trigger any code in maintainer scripts that might # create files. # # XXX: We do this manually by editing the status file. # XXX: We do this for packages that might not have maintscripts, or might # not involve affected directories. # debug('marking all dpkg packages as half-configured'); if (not $opt_noact) { open my $fh_lock, '>', "$ADMINDIR/lock" or sysfatal('cannot open dpkg database lock file'); my $fs = File::FcntlLock->new(l_type => F_WRLCK); $fs->lock($fh_lock, F_SETLKW) or sysfatal('cannot get a write lock on dpkg database'); my $file_db = "$ADMINDIR/status"; my $file_dbnew = $file_db . '.new'; open my $fh_dbnew, '>', $file_dbnew or sysfatal('cannot open new dpkg database'); open my $fh_db, '<', $file_db or sysfatal('cannot open dpkg database'); while (<$fh_db>) { if (m/^Status: /) { s/ installed$/ half-configured/; } print { $fh_dbnew } $_; } close $fh_db; $fh_dbnew->flush() or sysfatal('cannot flush new dpkg database'); $fh_dbnew->sync() or sysfatal('cannot fsync new dpkg database'); close $fh_dbnew or sysfatal('cannot close new dpkg database'); rename $file_dbnew, $file_db or sysfatal('cannot rename new dpkg database'); } # # Replace things as quickly as possible: # foreach my $dir (@aliased_dirs) { debug("making dir backup = $dir.aliased"); if (not $opt_noact) { rename $dir, "$dir.aliased" or sysfatal("cannot make backup directory $dir.aliased"); } debug("renaming $sroot$dir to $dir"); if (not $opt_noact) { rename "$sroot$dir", $dir or sysfatal("cannot install fixed directory $dir"); } } mac_relabel(); # # Cleanup backup directories. # foreach my $dir (@aliased_dirs) { debug("removing backup = $dir.aliased"); if (not $opt_noact) { unlink "$dir.aliased" or sysfatal("cannot cleanup backup directory $dir.aliased"); } } my %deferred_dirnames; # # Cleanup moved objects. # foreach my $pathname (sort keys %aliased_pathnames) { my (@meta) = lstat $pathname or sysfatal("cannot lstat object $pathname for cleanup"); if (-d _) { # Skip directories as this might be shared by a proper path under the # aliased hierearchy. And so that we can remove them in reverse order. debug("deferring merged dir cleanup = /usr$pathname"); $deferred_dirnames{"/usr$pathname"} = 1; } else { debug("cleaning up pathname = /usr$pathname"); next if $opt_noact; unlink "/usr$pathname" or sysfatal("cannot unlink object /usr$pathname"); } } # # Cleanup deferred directories. # debug("cleaning up shadow deferred dir = $sroot"); my $arg_max = POSIX::sysconf(POSIX::_SC_ARG_MAX) // POSIX::_POSIX_ARG_MAX; my @batch_dirs; my $batch_size = 0; foreach my $dir (keys %deferred_dirnames) { my $dir_size = length($dir) + 1; if ($batch_size + $dir_size < $arg_max) { $batch_size += length($dir) + 1; push @batch_dirs, $dir; } else { next; } next if length $batch_size == 0; open my $fh_dirs, '-|', 'dpkg-query', '--search', @batch_dirs or fatal("cannot execute dpkg-query --search: $!"); while (<$fh_dirs>) { if (m/^.*: (.*)$/) { # If the directory is known by its aliased name, it should not be # cleaned up. if (exists $deferred_dirnames{$1}) { delete $deferred_dirnames{$1}; } } } close $fh_dirs; @batch_dirs = (); $batch_size = 0; } my @dirs_linger; if (not $opt_noact) { foreach my $dirname (reverse sort keys %deferred_dirnames) { next if rmdir $dirname; warning("cannot remove shadow directory $dirname: $!"); push @dirs_linger, $dirname; } } if (not $opt_noact) { debug("cleaning up shadow root dir = $sroot"); rmdir $sroot or warning("cannot remove shadow directory $sroot: $!"); } # # Re-configure all packages, so that postinst maintscripts are executed. # my $policypath = '/usr/sbin/dpkg-fsys-usrunmess-policy-rc.d'; debug('installing local policy-rc.d'); if (not $opt_noact) { open my $policyfh, '>', $policypath or sysfatal("cannot create $policypath"); print { $policyfh } <<'POLICYRC'; #!/bin/sh echo "$0: Denied action $2 for service $1" exit 101 POLICYRC close $policyfh or fatal("cannot write $policypath"); my @alt = (qw(/usr/sbin/policy-rc.d policy-rc.d), $policypath, qw(1000)); system(qw(update-alternatives --install), @alt) == 0 or fatal("cannot register $policypath"); system(qw(update-alternatives --set policy-rc.d), $policypath) == 0 or fatal("cannot select alternative $policypath"); } debug('reconfiguring all packages'); if (not $opt_noact) { local $ENV{DEBIAN_FRONTEND} = 'noninteractive'; system(qw(dpkg --configure --pending)) == 0 or fatal("cannot reconfigure packages: $!"); } debug('removing local policy-rc.d'); if (not $opt_noact) { system(qw(update-alternatives --remove policy-rc.d), $policypath) == 0 or fatal("cannot unregister $policypath: $!"); unlink $policypath or warning("cannot remove $policypath"); # Restore the selections we saved initially. open my $altfh, '|-', qw(update-alternatives --set-selections) or fatal('cannot restore alternatives state'); print { $altfh } $_ foreach @selections; close $altfh or fatal('cannot restore alternatives state'); } print "\n"; if (@dirs_linger) { warning('lingering directories that could not be removed:'); foreach my $dir (@dirs_linger) { warning(" $dir"); } } print "Done, hierarchy unmessed, congrats!\n"; print "Rebooting now is very strongly advised.\n"; print "(Note: you might need to run 'hash -r' in your shell.)\n"; 1; ## ## Functions ## sub debug { my $msg = shift; print { *STDERR } "D: $msg\n"; } sub warning { my $msg = shift; warn "warning: $msg\n"; } sub fatal { my $msg = shift; die "error: $msg\n"; } sub sysfatal { my $msg = shift; fatal("$msg: $!"); } sub copy { my ($src, $dst) = @_; # Try to hardlink first. return if link $src, $dst; # If we are on different filesystems, try a copy. if ($! == POSIX::EXDEV) { # XXX: This will not preserve hardlinks, these would get restored # after the next package upgrade. system('cp', '-a', $src, $dst) == 0 or fatal("cannot copy file $src to $dst: $?"); } else { sysfatal("cannot link file $src to $dst"); } } sub mac_relabel { my $has_cmd = 0; foreach my $path (split /:/, $ENV{PATH}) { if (-x "$path/restorecon") { $has_cmd = 1; last; } } return unless $has_cmd; foreach my $pathname (@relabel) { system('restorecon', $pathname) == 0 or fatal("cannot restore MAC context for $pathname: $?"); } } sub add_pathname { my ($pathname, $origin) = @_; if ($pathname =~ m{^/usr/lib/modules/}) { debug("tracking $origin = $pathname"); $usr_mod_pathnames{$pathname} = 1; } elsif ($pathname =~ m/$aliased_regex/) { debug("adding $origin = $pathname"); $aliased_pathnames{$pathname} = 1; } } sub prompt { my $query = shift; print "$query (y/N)? "; my $reply = <STDIN>; chomp $reply; return 0 if $reply ne 'y' and $reply ne 'yes'; return 1; } sub version() { printf "Debian %s version %s.\n", $PROGNAME, $PROGVERSION; } sub usage { printf 'Usage: %s [<option>...]' . "\n\n" . 'Options: -p, --prompt prompt before the point of no return. --prevention enable regression prevention package installation. --no-prevention disable regression prevention package installation. -n, --no-act just check and create the new structure, no switch. --dry-run ditto. -?, --help show this help message. --version show the version.' . "\n", $PROGNAME; } sub usageerr { my $msg = shift; state $printforhelp = 'Use --help for program usage information.'; $msg = sprintf $msg, @_ if @_; warn "$PROGNAME: error: $msg\n"; warn "$printforhelp\n"; exit 2; }