hi guys, just a question: Who is the user who executes the shell scripts set in the control panel? thanks
So I if ISPConfig uses web1 to execute a /var/www/mysite.com/web/myscript.sh script is the Max. Allowed Cronjob types (chrooted and full implies url) set as chrooted or full? Furthermore, how have I to check the Custom Script Logs of each script executed by ISPConfig? thanks falko
Hi Falko, thanks for your reply. Infact, I am using the chrooted mode but seems to me that the script doesn't start at all. Is there a way to grab the log of each script executed by ISPConfig?
Hi Falko, this is the log information in auth.log Code: # tail /var/log/auth.log Mar 27 08:05:01 webserver CRON[32573]: pam_unix(cron:session): session closed for user web3415 Mar 27 08:05:01 webserver jk_chrootsh[32596]: path /var/www/clients/client24/web56 is not owned by user 0 Mar 27 08:05:01 webserver jk_chrootsh[32596]: path /var/www/clients/client24/web56 is not owned by group 0 Mar 27 08:05:01 webserver jk_chrootsh[32596]: abort, /var/www/clients/client24/web56 is not a safe chroot jail. Mar 27 08:10:01 webserver jk_chrootsh[373]: abort, homedir '/var/www/clients/client167/web3862' for user web3862 (1100) does not contain the jail separator <jail>/./<home> Mar 27 08:10:01 webserver jk_chrootsh[376]: abort, /var/www/clients/client25/web3453 is not a safe chroot jail. Seems that the system doesn't have any privileges for executing the crons. Is a ISPConfig bug? I have read this article, is this problem solved: http://www.howtoforge.com/forums/showthread.php?t=53553 thanks
Which ISPConfig version do you use at the moment and with which ispconfig version did you create the cronjob?
When the cronjob was created by a earlier version that had this bug then it might be that the jail is broken. First you should update to the current version 3.0.4.3 and then delete the cronjob and create a new one.
Hi Till, I have updated ISPConfig and I have update all the cron entries too but I get this error: Code: jk_chrootsh[13747]: abort, homedir '/var/www/clients/client45/web101' for user web101 (1054) does not contain the jail separator <jail>/./<home> how have I to solve this problem?
I just checked the scripts and the jail gets only created once when the first jailed cron is created. So the best is to fix your jail manually. Please post the output of: grep web101 /etc/passwd
Good morning Till, here we go: # grep web101 /etc/passwd web101:x:1054:1045::/var/www/clients/client45/web101:/bin/false thanks
It's odd. I have seen the crons and seems that cron entries log is: Code: Mar 28 13:19:01 webserver CRON[2055]: pam_unix(cron:session): session opened for user root by (uid=0) Mar 28 13:19:01 webserver CRON[2055]: pam_unix(cron:session): session closed for user root but the default website folder permissions have : Code: /var/www/mydomain.com# ll total 16 drwxr-x--x 2 web3873 client173 4096 Mar 28 11:01 cgi-bin lrwxrwxrwx 1 root root 40 Mar 28 11:01 log -> /var/log/ispconfig/httpd/mydomain.com drwxr-x--x 2 web3873 client173 4096 Mar 28 11:01 ssl drwxrwxrwx 2 web3873 client173 4096 Mar 28 11:01 tmp drwx--x--- 4 web3873 client173 4096 Mar 28 11:01 web in this case if I attach a cron entry in the administration panel I get the error posted above, in the first post. So which is the right permissions of this folder? thanks
The folder permissions are fine. The cron lines you posted above are not related to the cronjob that you created, they are from the ispconfig internal cronjob and not from your user cronjob and beside that, they are success messages and not errors.
Now I get this error: Code: Mar 28 14:10:01 webserver jk_chrootsh[25571]: path /var/www/clients/client45/web101/./ is not owned by user 1054 Mar 28 14:10:01 webserver jk_chrootsh[25571]: path /var/www/clients/client45/web101/./ is not owned by group 1045 Mar 28 14:10:01 webserver jk_chrootsh[25571]: abort, path /var/www/clients/client45/web101/./ is not owned by 1054
Code: # ls -la /var/www/clients/client45/web101/home/ total 12 drwxr-xr-x 3 root root 4096 Mar 22 11:46 . drwxr-xr-x 13 root root 4096 Mar 28 13:46 .. drwxr-xr-x 2 web101 client45 4096 Mar 22 11:46 web101