hello I just made a reseller user with a jailed cron and then added some cron entries after logging in as the user, the problem I'm having is the users domain directory is filled with folders like bin var etc home lib lib64 and so on.. I since then un-jailed the reseller user and those folders have not went away.... I tried a reboot but still nothing, I can't rm -rf the folders: rm: cannot remove 'bin': Operation not permitted So what do I do to properly remove the jailkit on the reseller ? thank you in advance I'm new to ISPConfig.
There is no clean/automatic removal of those directories for you, as you have noted; you can clean it up as root in the server backend. To know exactly what to leave vs. remove you could create a new website without jailkit enabled and compare the directories which are created. For a debian9 server I'm running that looks like (jailkit, vs. non-jailkit): Code: /var/www/clients/client8/web38: bin cgi-bin dev etc home lib lib64 log private ssl tmp usr var web webdav /var/www/clients/client8/web41: cgi-bin log private ssl tmp web webdav So you'd remove bin, dev, etc, home, lib, lib64, usr, and var. You might also find a 'backup' directory, leave that untouched.
You will need to remove the immutable attribute on the web# directory first, and set it again when done. Look up the correct directory name under /var/www/clients/*/ eg.: Code: # ls -l /var/www/yourdomain.com lrwxrwxrwx 1 root root 31 Jun 12 11:42 /var/www/yourdomain.com -> /var/www/clients/client8/web17/ # chattr -i /var/www/clients/client8/web17/ # rm /var/www/clients/client8/web17/{bin,dev,etc,home,lib,lib64,usr,var} # chattr +i /var/www/clients/client8/web17/ Again, that has to be done as root in the system back end.
seems I fixed it with changing the /etc/passwd file so the users shell points back to /bin/false and commenting out what was added in /etc/jailkit/jk_socketd.ini then I cd'd to client directory and chattr -i -a . ; rm -rf bin dev etc home lib lib64 log run usr var chattr +i . but now log directory wont remove, "rm: cannot remove 'log': Device or resource busy"
oh my mistake.. it seems the log directory is not apart of the jailkit system. Anyway I wish in the future updates of ISPConfig this automation of removing and listing current jailed directories (jailkit management maybe) could be added in the future. Thanks for helping me!!