Cron Job & Directory Problems

Discussion in 'General' started by FSNTiger, Oct 1, 2014.

  1. FSNTiger

    FSNTiger Member

    I am trying to setup a jailed cron, but I can't get it to run. The error I am getting tells me there is no home directory. I checked and none of the cron related directories are created, and I get a permission denied (even as root) when trying to create them by hand.

    I checked in /etc/passwd and the configuration adjusted fine when changed from URL crons to any other option, but without the home directory it fails.

    Should ISPConfig create these directories, and if so when? Where should I look as to why it is not creating them?

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    All directories are created by jailkit which is executed by ispconfig when a jail is required. so the problem is mots likely in jailkit, maybe it is not installed or not working properly.
  3. FSNTiger

    FSNTiger Member

    Would you have any suggestions on where to start looking to see if it is working? this is the first time I have needed a cron job for a website.

    I also ran into a problem with the basic URL cron, wget gets a 403 forbidden response unless I edit the cron manually and add a user agent. I am not sure where to even look to resolve that one. I check the basic httpd.conf and the site conf file and found nothing blocking a specifc user agent (wget). Any help with this issue as well would be great.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    First I would reinstall jailkit as described in the perfect server guides and then rerun the ispconfig update and then let it reconfigure services to ensure that jailkit is configured prperly. Take a look here for debug instructions:

    ispconfig does not configure any software to block user agents. so its either in the script that yoz call or you installed additional software like mod_security which blocks it.
  5. FSNTiger

    FSNTiger Member

    The cluster of servers I have was made following the perfect server guide here:

    After that, I have made adjustments as follows:

    • Fixed amavisd using perfect server 6.5 settings
    • Added APC and Removed EAccelerator (Fix Problems with PHPMyAdmin)
    • New mod_ruby download Location
    • Configured Mailman using perfect server 6.5 settings
    • Enabled port 587 for mail
    • Added Postgrey
    • Enable mod_expires And mod_deflate
    • added ability to change passwords inside squirrelmail
    • added DNS forwarders when needed
    • added real ssl to squirrelmail

    Most recently I added multiple versions of PHP for a client who needed an older version.

    These servers have been running since Centos 6.0, and just get updated as needed to keep everything current.

    I did figure out my wget issues when you had me look at my changes (+1 for good documentation). I made changes to libwww-perl.conf to increase security. So that problem is now solved.

    I will post the test results, and will reinstall jailkit and see what happens, then post back. My guess is when I updated ISPConfig I normally choose not to reconfigure services, as i would have to reconfigure all my adjustments. Since ISPConfig has had new version, maybe the new versions make changes to Jailkit?

    Is there some way to only reconfigure certain services when updating?
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    You can only reconfigure all services together. Most of your changes wont get affected, most likely its just a problem with postfix. But you can set custom installer templates for all your changes so that all change sstay on updates with reconfigure services.

    a update without reconfiguring services can only be used for minor patch updates, for larger updates your system might be broken without a reconfigire as you old configuration can be incompatible with the new ispconfig version.
  7. FSNTiger

    FSNTiger Member

    Ok, how do I setup custom installer templates? We have probably not reconfigured since ISPConfig version 3.3 or 3.4 came out.
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    The installer templates are in the install/tpl/ folder of the tar.gz. If you modify one of these templates for your server, then you can store them in /usr/local/ispconfig/server/conf-custom/install/ and the installer will prefer these local templates over the ones in the tar.gz for future updates.
  9. FSNTiger

    FSNTiger Member

    Ok, I have removed and reinstalled jailkit. I then manually run the update on ISPConfig again by these commands:

    cd /tmp
    tar xvfz ISPConfig-3-stable.tar.gz
    cd ispconfig3_install/install
    php -q update.php

    and while updating had it reconfigure all services.

    Then I tested the cron job again, I am still getting this error:

    Oct 2 13:35:01 daedalus CROND[28570]: (CRON) ERROR chdir failed (/var/www/clients/client1/web136/./home/web136): No such file or directory

    Any ideas?
  10. FSNTiger

    FSNTiger Member

    I just tried to start jailkit (not sure if its a normal service or not) and got this:

    [[email protected] cron.d]# service jailkit start
    Starting jailkit: jk_socketdversion 2.11, no sockets specified in configfile /etc/jailkit/jk_socketd.ini or on commandline, nothing to do, exiting...

    Don't know if that's important or not.
  11. FSNTiger

    FSNTiger Member

    Just to test I just tried to install a brand new server using the guidelines here:

    I followed each step. Once completed I created a testing client, gave that client limits allowing for Chrooted Cron, and up to 5 cron jobs. Then I created a website, an ftp account, and a cron job. The cron command was:

    /usr/bin/curl -s

    I then created test.php and ftp'd it to the website. Test.php contained:


    echo "SUCCESS"


    At the right time the cron failed to run:

    Oct 2 21:10:01 testbox CROND[28801]: (CRON) ERROR chdir failed (/var/www/clients/client1/web2/./home/web2): No such file or directory

    So there must be something a little deeper causing this issue since its not working in a perfect server either.
  12. FSNTiger

    FSNTiger Member

    Does anyone have any ideas on how to resolve this problem?
  13. till

    till Super Moderator Staff Member ISPConfig Developer

  14. FSNTiger

    FSNTiger Member

    The specific cron job should not matter. It could be anything. The fact is the folders are not created to even run the cron job in the first place.

    If you want I will put a script in there, but without the right folders, no cron job gets run. It always errors out.

Share This Page