XYZ File Manager
Current Path:
/usr/sbin
usr
/
sbin
/
📁
..
📄
cagefs_enter_site
(1.83 KB)
📄
cagefsctl-user
(12.89 KB)
📄
chroot
(39.73 KB)
📄
consoletype
(15.13 KB)
📄
cracklib-check
(15.7 KB)
📄
cracklib-format
(255 B)
📄
cracklib-packer
(15.7 KB)
📄
cracklib-unpacker
(15.69 KB)
📄
create-cracklib-dict
(994 B)
📄
ddns-confgen
(27.25 KB)
📄
exim
(1.25 KB)
📄
faillock
(23.18 KB)
📄
hsendmail
(4.4 MB)
📄
ip
(762.27 KB)
📄
ldconfig
(1.12 MB)
📄
mkhomedir_helper
(23.21 KB)
📄
named-checkzone
(39.34 KB)
📄
named-compilezone
(39.34 KB)
📄
named-nzd2nzf
(15.12 KB)
📄
nsec3hash
(15.19 KB)
📄
pam_console_apply
(43.51 KB)
📄
pam_namespace_helper
(471 B)
📄
pam_timestamp_check
(15.13 KB)
📄
pluginviewer
(19.39 KB)
📄
proxyexec
(24.01 KB)
📄
pwhistory_helper
(19.2 KB)
📄
saslauthd
(88.33 KB)
📄
sasldblistusers2
(15.27 KB)
📄
saslpasswd2
(15.24 KB)
📄
sendmail
(4.4 MB)
📄
sendmail.bak
(1.03 KB)
📄
sendmail.exim
(1.25 KB)
📄
testsaslauthd
(15.16 KB)
📄
tmpwatch
(36.03 KB)
📄
tsig-keygen
(27.25 KB)
📄
unix_chkpwd
(23.28 KB)
📄
unix_update
(31.32 KB)
Editing: cagefs_enter_site
#!/opt/cloudlinux/venv/bin/python3 -sbb # -*- coding: utf-8 -*- # # Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2025 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # https://cloudlinux.com/docs/LICENCE.TXT # """ Execute a command inside CageFS for a site (document root or domain). This wrapper provides a command-line interface for executing commands within the isolated CageFS environment for a specific website. """ import argparse import os import sys from clcagefslib.webisolation import libenter def create_parser(): """ Create argument parser for cagefs_enter_site. Returns: argparse.ArgumentParser: Configured argument parser """ parser = argparse.ArgumentParser( # the command is named with _underscores_ to match # existing cagefs_enter wrapper from lvewrappers prog="cagefs_enter_site", description="Execute a command inside CageFS for a site (document root or domain)", ) parser.add_argument("site", type=str, help="Document root or domain") parser.add_argument( "command", type=str, nargs=argparse.REMAINDER, help="Command to execute" ) return parser def main(): """ Main entry point. Returns: int: Exit code """ parser = create_parser() args = parser.parse_args() if not args.command: parser.error("COMMAND is required") try: return libenter.enter_site(args.site, args.command) except ValueError as e: print(f"Error: {e}", file=sys.stderr) return 1 except KeyboardInterrupt: # Clean Ctrl+C exit without traceback (exit code 130 = SIGINT). return 130 if __name__ == "__main__": if os.geteuid() == 0: print("Error: This program can not be run as root", file=sys.stderr) sys.exit(1) sys.exit(main())
Upload File
Create Folder