Welcome got problem with ssh and jailkit when creating new command user script is not creating home dir for ssh user. Below logs Code: Wed Dec 29 15:49:02 CET 2021 29.12.2021-15:49 - DEBUG - Calling function 'insert' from plugin 'shelluser_base_plugin' raised by event 'shell_user_insert'. Wed Dec 29 15:49:02 CET 2021 29.12.2021-15:49 - DEBUG - Action aborted, target is a symlink: Wed Dec 29 15:49:02 CET 2021 PHP Warning: mkdir(): Operation not permitted in /usr/local/ispconfig/server/lib/classes/file.inc.php on line 156 Wed Dec 29 15:49:02 CET 2021 29.12.2021-15:49 - DEBUG - chmod failed: /var/www/clients/client49/web152/home : 493 Wed Dec 29 15:49:02 CET 2021 PHP Warning: mkdir(): Operation not permitted in /usr/local/ispconfig/server/lib/classes/file.inc.php on line 156 Wed Dec 29 15:49:02 CET 2021 29.12.2021-15:49 - DEBUG - safe_exec cmd: useradd -d '/var/www/clients/client49/web152/home/geplasttest' -g 'client49' -o -s '/bin/bash' -u '5022' 'geplasttest' - return code: 0 Wed Dec 29 15:49:02 CET 2021 29.12.2021-15:49 - DEBUG - Executed command: useradd -d ? -g ? -o -s ? -u ? ? Wed Dec 29 15:49:02 CET 2021 29.12.2021-15:49 - DEBUG - Added shelluser: geplasttest Wed Dec 29 15:49:02 CET 2021 29.12.2021-15:49 - DEBUG - chown failed: /var/www/clients/client49/web152 : geplasttest Wed Dec 29 15:49:02 CET 2021 29.12.2021-15:49 - DEBUG - chgrp failed: /var/www/clients/client49/web152 : client49 Wed Dec 29 15:49:03 CET 2021 29.12.2021-15:49 - DEBUG - ssh-rsa setup shelluser_base Wed Dec 29 15:49:03 CET 2021 PHP Warning: mkdir(): Operation not permitted in /usr/local/ispconfig/server/lib/classes/file.inc.php on line 156 Wed Dec 29 15:49:03 CET 2021 PHP Warning: file_put_contents(/var/www/clients/client49/web152/home/geplasttest/.ssh/authorized_keys): failed to open stream: No such file or directory in /usr/local/ispconfig/server/lib/classes/system.inc.php on line 865 Wed Dec 29 15:49:03 CET 2021 PHP Warning: file_put_contents(/var/www/clients/client49/web152/home/geplasttest/.ssh/authorized_keys): failed to open stream: No such file or directory in /usr/local/ispconfig/server/lib/classes/system.inc.php on line 865 Wed Dec 29 15:49:03 CET 2021 PHP Warning: fopen(/var/www/clients/client49/web152/home/geplasttest/.ssh/authorized_keys): failed to open stream: No such file or directory in /usr/local/ispconfig/server/lib/classes/file.inc.php on line 36 Wed Dec 29 15:49:03 CET 2021 29.12.2021-15:49 - ERROR - WARNING: Could not open file /var/www/clients/client49/web152/home/geplasttest/.ssh/authorized_keys Wed Dec 29 15:49:03 CET 2021 PHP Warning: mkdir(): Operation not permitted in /usr/local/ispconfig/server/lib/classes/file.inc.php on line 156 Wed Dec 29 15:49:03 CET 2021 PHP Warning: fopen(/var/www/clients/client49/web152/home/geplasttest/.ssh/authorized_keys): failed to open stream: No such file or directory in /usr/local/ispconfig/server/lib/classes/file.inc.php on line 53 Wed Dec 29 15:49:03 CET 2021 29.12.2021-15:49 - ERROR - WARNING: Could not open file /var/www/clients/client49/web152/home/geplasttest/.ssh/authorized_keys Wed Dec 29 15:49:03 CET 2021 29.12.2021-15:49 - DEBUG - ssh-rsa authorisation keyfile created in /var/www/clients/client49/web152/home/geplasttest/.ssh/authorized_keys Wed Dec 29 15:49:03 CET 2021 PHP Warning: file(/var/www/clients/client49/web152/home/geplasttest/.ssh/authorized_keys): failed to open stream: No such file or directory in /usr/local/ispconfig/server/plugins-available/shelluser_base_plugin.inc.php on line 491 Wed Dec 29 15:49:03 CET 2021 PHP Warning: array_search() expects parameter 2 to be array, bool given in /usr/local/ispconfig/server/plugins-available/shelluser_base_plugin.inc.php on line 498 Wed Dec 29 15:49:03 CET 2021 PHP Warning: array_merge(): Expected parameter 1 to be an array, bool given in /usr/local/ispconfig/server/plugins-available/shelluser_base_plugin.inc.php on line 507 Wed Dec 29 15:49:03 CET 2021 PHP Warning: file_put_contents(/var/www/clients/client49/web152/home/test/.ssh/authorized_keys): failed to open stream: No such file or directory in /usr/local/ispconfig/server/lib/classes/system.inc.php on line 865 Wed Dec 29 15:49:03 CET 2021 PHP Warning: fopen(/var/www/clients/client49/web152/home/test/.ssh/authorized_keys): failed to open stream: No such file or directory in /usr/local/ispconfig/server/lib/classes/file.inc.php on line 36 Wed Dec 29 15:49:03 CET 2021 29.12.2021-15:49 - ERROR - WARNING: Could not open file /var/www/clients/client49/web152/home/test/.ssh/authorized_keys Wed Dec 29 15:49:03 CET 2021 PHP Warning: mkdir(): Operation not permitted in /usr/local/ispconfig/server/lib/classes/file.inc.php on line 156 Wed Dec 29 15:49:03 CET 2021 PHP Warning: fopen(/var/www/clients/client49/web152/home/test/.ssh/authorized_keys): failed to open stream: No such file or directory in /usr/local/ispconfig/server/lib/classes/file.inc.php on line 53 Wed Dec 29 15:49:03 CET 2021 29.12.2021-15:49 - ERROR - WARNING: Could not open file /var/www/clients/client49/web152/home/test/.ssh/authorized_keys Wed Dec 29 15:49:03 CET 2021 29.12.2021-15:49 - DEBUG - ssh-rsa key updated in /var/www/clients/client49/web152/home/test/.ssh/authorized_keys Wed Dec 29 15:49:03 CET 2021 chown: cannot access '/var/www/clients/client49/web152/home/test/.ssh': No such file or directory Wed Dec 29 15:49:03 CET 2021 29.12.2021-15:49 - DEBUG - safe_exec cmd: chown -R 'web152':'client49' '/var/www/clients/client49/web152/home/test/.ssh' - return code: 1 Wed Dec 29 15:49:03 CET 2021 chmod: cannot access '/var/www/clients/client49/web152/home/test/.ssh/authorized_keys': No such file or directory Wed Dec 29 15:49:03 CET 2021 29.12.2021-15:49 - DEBUG - safe_exec cmd: chmod 600 '/var/www/clients/client49/web152/home/test/.ssh/authorized_keys' - return code: 1 Wed Dec 29 15:49:03 CET 2021 29.12.2021-15:49 - DEBUG - touch failed: /var/www/clients/client49/web152/home/test/.bash_history Wed Dec 29 15:49:04 CET 2021 29.12.2021-15:49 - DEBUG - chmod failed: /var/www/clients/client49/web152/home/test/.bash_history : 488 Wed Dec 29 15:49:04 CET 2021 29.12.2021-15:49 - DEBUG - touch failed: /var/www/clients/client49/web152/home/test/.profile Wed Dec 29 15:49:04 CET 2021 29.12.2021-15:49 - DEBUG - chmod failed: /var/www/clients/client49/web152/home/test/.profile : 420 Wed Dec 29 15:49:04 CET 2021 29.12.2021-15:49 - DEBUG - Action aborted, target is a symlink: Wed Dec 29 15:49:04 CET 2021 29.12.2021-15:49 - DEBUG - Calling function 'insert' from plugin 'shelluser_jailkit_plugin' raised by event 'shell_user_insert'. Wed Dec 29 15:49:04 CET 2021 29.12.2021-15:49 - DEBUG - Jailkit Plugin -> insert username:testskipped, Jailkit not selected Wed Dec 29 15:49:04 CET 2021 29.12.2021-15:49 - DEBUG - Processed datalog_id 11987 Wed Dec 29 15:49:04 CET 2021 29.12.2021-15:49 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock Wed Dec 29 15:49:04 CET 2021 finished server.php.
sudo crontab -e Code: * * * * * /usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done * * * * * /usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done even if i run it manualy from root nothing changeing. It was working before, don't realy know what changed :/ if i good undersand script can't mkdir becouse it don't got permission to create folders :/ default php is 7.4
Sounds like some component of the path to /var/www/clients/client49/web152/home is a symlink; if you're moving files to another device (eg. for /var/www) you have to set it up as a mount point, not a symlink. (Use a bind mount if the location is a directory somewhere else and not a device which can be directly mounted at /var/www.)
ls -la /var/www/clients/client49/web152/ Code: total 48 drwxr-xr-x 10 root root 4096 Mar 30 2021 . drwxr-xr-x 3 root root 4096 Mar 30 2021 .. drwxr-xr-x 2 web152 client49 4096 Mar 30 2021 cgi-bin drwxr-xr-x 3 web152 client49 12288 Dec 29 15:46 log drwx--x--- 2 web152 client49 4096 Mar 30 2021 private drwx------ 2 web152 client49 4096 Mar 30 2021 .ssh drwxr-xr-x 2 web152 client49 4096 Apr 25 2021 ssl drwxrwx--- 4 web152 client49 4096 Dec 29 08:41 tmp drwx--x--x 21 web152 client49 4096 May 12 2021 web drwx--x--- 2 web152 client49 4096 Mar 30 2021 webdav same problem effect all websites in this server i tested solution: created test.php file with code: Code: mkdir("/var/www/clients/client49/web152/test", 0700) run form root and got error "PHP Warning: mkdir(): Operation not permitted " i changed code to Code: mkdir("/var/test", 0700) and script created folder :/ it looks form me it is smth with php or chmod but what ?
mount Code: sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) udev on /dev type devtmpfs (rw,nosuid,relatime,size=10271460k,nr_inodes=2567865,mode=755) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=2056536k,mode=755) /dev/vda5 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755) cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd) pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime) cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct) cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event) cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory) cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer) cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio) cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset) cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio) cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices) cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids) systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=36,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=350) hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime) mqueue on /dev/mqueue type mqueue (rw,relatime) debugfs on /sys/kernel/debug type debugfs (rw,relatime) /dev/vda5 on /var/www/clients/client37/web115/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client44/web146/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client33/web113/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client37/web155/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client0/web149/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client42/web123/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client0/web127/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client0/web159/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client49/web152/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client0/web137/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client33/web114/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client51/web156/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client44/web133/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client52/web160/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client9/web116/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client51/web157/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client28/web165/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client47/web154/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client33/web126/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client0/web117/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client21/web158/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client50/web153/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client44/web132/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client41/web118/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda5 on /var/www/clients/client21/web134/log type ext4 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vda1 on /boot type ext2 (rw,relatime) /dev/vdb1 on /disk2 type ext3 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group) /dev/vdb1 on /var/vmail type ext3 (rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group,_netdev) tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=2056532k,mode=700) /etc/fstab Code: # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> /dev/vda5 / ext4 errors=remount-ro,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 0 1 /dev/vda1 /boot ext2 defaults 0 2 /dev/vdb1 /disk2 ext3 defaults,errors=remount-ro,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 0 1 /disk2/vmail /var/vmail none bind,nobootwait,_netdev 0 0 /var/log/ispconfig/httpd/.pl /var/www/clients/client33/web113/log none bind,nobootwait 0 0 /var/log/ispconfig/httpd/.pl /var/www/clients/client33/web114/log none bind,nobootwait 0 0 /var/log/ispconfig/httpd/.pl /var/www/clients/client37/web115/log none bind,nobootwait 0 0 /var/log/ispconfig/httpd/.pl /var/www/clients/client9/web116/log none bind,nobootwait 0 0 /var/log/ispconfig/httpd/.pl /var/www/clients/client0/web117/log none bind,nobootwait 0 0 /var/log/ispconfig/httpd/.pl /var/www/clients/client41/web118/log none bind,nobootwait 0 0 /var/log/ispconfig/httpd/.pl /var/www/clients/client42/web123/log none bind,nobootwait 0 0 /var/log/ispconfig/httpd/.pl /var/www/clients/client33/web126/log none bind,nobootwait 0 0 /var/log/ispconfig/httpd/.pl /var/www/clients/client0/web127/log none bind,nobootwait 0 0 /var/log/ispconfig/httpd/.pl /var/www/clients/client44/web132/log none bind,nobootwait 0 0 /var/log/ispconfig/httpd/.pl /var/www/clients/client44/web133/log none bind,nobootwait 0 0 /var/log/ispconfig/httpd/.pl /var/www/clients/client21/web134/log none bind,nobootwait 0 0 /var/log/ispconfig/httpd/.pl /var/www/clients/client0/web137/log none bind,nobootwait 0 0 /var/log/ispconfig/httpd/.pl /var/www/clients/client44/web146/log none bind,nofail 0 0 /var/log/ispconfig/httpd/..pl /var/www/clients/client0/web149/log none bind,nofail 0 0 /var/log/ispconfig/httpd/.pl /var/www/clients/client49/web152/log none bind,nofail 0 0 /var/log/ispconfig/httpd/.com /var/www/clients/client50/web153/log none bind,nofail 0 0 /var/log/ispconfig/httpd/.pl /var/www/clients/client47/web154/log none bind,nofail 0 0 /var/log/ispconfig/httpd/.pl /var/www/clients/client37/web155/log none bind,nofail 0 0 /var/log/ispconfig/httpd/.pl /var/www/clients/client51/web156/log none bind,nofail 0 0 /var/log/ispconfig/httpd/..pl /var/www/clients/client51/web157/log none bind,nofail 0 0 /var/log/ispconfig/httpd/..pl /var/www/clients/client21/web158/log none bind,nofail 0 0 /var/log/ispconfig/httpd/..pl /var/www/clients/client0/web159/log none bind,nofail 0 0 /var/log/ispconfig/httpd/.pl /var/www/clients/client52/web160/log none bind,nofail 0 0 /var/log/ispconfig/httpd/.pl /var/www/clients/client28/web165/log none bind,nofail 0 0 /etc/mtab Code: sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0 proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0 udev /dev devtmpfs rw,nosuid,relatime,size=10271460k,nr_inodes=2567865,mode=755 0 0 devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0 tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=2056536k,mode=755 0 0 /dev/vda5 / ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0 tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0 tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0 tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0 cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd 0 0 pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0 cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0 cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0 cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0 cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0 cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0 cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0 cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0 cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0 cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0 systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=36,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=350 0 0 hugetlbfs /dev/hugepages hugetlbfs rw,relatime 0 0 mqueue /dev/mqueue mqueue rw,relatime 0 0 debugfs /sys/kernel/debug debugfs rw,relatime 0 0 /dev/vda5 /var/www/clients/client37/web115/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client44/web146/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client33/web113/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client37/web155/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client0/web149/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client42/web123/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client0/web127/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client0/web159/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client49/web152/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client0/web137/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client33/web114/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client51/web156/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client44/web133/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client52/web160/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client9/web116/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client51/web157/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client28/web165/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client47/web154/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client33/web126/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client0/web117/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client21/web158/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client50/web153/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client44/web132/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client41/web118/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda5 /var/www/clients/client21/web134/log ext4 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vda1 /boot ext2 rw,relatime 0 0 /dev/vdb1 /disk2 ext3 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 /dev/vdb1 /var/vmail ext3 rw,relatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group 0 0 tmpfs /run/user/0 tmpfs rw,nosuid,nodev,relatime,size=2056532k,mode=700 0 0 can You send me more info about solution? on this vps drive was enlarged, maby itis conectet with this? /var/www is not symlink, websites are default isp configuration
What does 'df /var/www/clients/client49/web152' show? Does mkdir from cli work? (ie. 'mkdir /var/www/clients/client49/web152/test' as root)
df /var/www/clients/client49/web152 Code: Filesystem 1K-blocks Used Available Use% Mounted on /dev/vda5 598287024 97201932 476335708 17% / mkdir /var/www/clients/client49/web152/test Code: mkdir: cannot create directory ‘/var/www/clients/client49/web152/test’: Operation not permitted ls -ld /var/www/clients/client49/web152/ Code: drwxr-xr-x 10 root root 4096 Mar 30 2021 /var/www/clients/client49/web152/ lsattr /var/www/clients/client49/web152 Code: ----i---------e---- lsattr /var/www/clients/client49/web152 subfolders Code: --------------e----
Attr value i means the file can not be modified. That is why subfolder can not be created. Command chattr changes the attributes.
This test must fail and is not suitable to dignose the issue, the folder /var/www/clients/client49/web152 is protected by the immutable attribute (chattr +i .....), which ispconfig removes (with chattr -i .....) before it tries to create folder. Your script does not remove it, therefore it must fail.
yes i removed +i manualy and it created all files but why isp is failing doing it in server.sh? after run isp add attr +i to folder, so it is problem with removeing it
Did you disable functions in php like exec, system or passthru in php.ini? These functions may not be disabled for cli (commandline) php, as ISPConfig is not be able to execute commands then. Disabling them for other php modes like php-fpm is fine though.
Code: <?php if(function_exists('exec')) { echo "exec is enabled \n"; } if(function_exists('system')) { echo "system is enabled \n"; } if(function_exists('passthru')) { echo "passthru is enabled \n"; } ?> run as root php test.php return Code: exec is enabled system is enabled passthru is enabled
Hmm, then I'm getting a bit out of ideas why the immutable bit can not be removed by ISPConfig on your system. May you please post the result of: php --version command.
php --version Code: PHP 7.4.27 (cli) (built: Dec 20 2021 21:34:08) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.27, Copyright (c), by Zend Technologies strange is this that it was working before. I rly dont know whats broke :/ but when i remove +i it do it his job. allready updated ips to newest version, updated apt, updated jailkit to newest version ;/
nop :/ ls -ld /var drwxr-xr-x 23 root root 4096 Dec 29 16:49 /var ls -ld /var/www drwxr-xr-x 8 root root 4096 Dec 29 09:41 /var/www i take part of isp code and run it manualy Code: function checkpath($path) { $path = trim($path); //* We allow only absolute paths if(substr($path, 0, 1) != '/') return "absolute paths"; //* We allow only some characters in the path // * is allowed, for example it is part of wildcard certificates/keys: *.example.com.crt if(!preg_match('@^/[-a-zA-Z0-9_/.*]{1,}[~]?$@', $path)) return "only some characters"; //* Check path for symlinks $path_parts = explode('/', $path); $testpath = ''; foreach($path_parts as $p) { $testpath .= '/'.$p; if(is_link($testpath)) return "symlinks"; } return true; } echo checkpath("/var/www/clients/client49/web152/"); echo "\n"; it returns 1 :/
if i good see, code in isp for error above is like below Code: $app->log("Action aborted, target is a symlink: $path", LOGLEVEL_DEBUG); or in Code: $app->log("Action aborted, target is a symlink: $document_root", LOGLEVEL_DEBUG); in my debug there is only so $path or $document_root look like empty... but it shoud be full path. Any clue why isp is geting empty path there?
ok i found smth. I use multiserver instalation problem is in slave vps in db in table `web_domain` there are missing domains i run domain resync now ips is normal creating ssh users problem solved slave vps didnt sync web_domain table witch main db slave server when create ssh user for domain which wasn't in db, it get empty response and return $document_root as empty sugest check what is returned to $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['new']['parent_domain_id']); in plugins-enabled/shelluser_jailkit_plugin.inc.php and others db queries and maby slave<-master resync from time to time in cron or other solution checking if is date in db up to date