Read Mail / CRON Jobs

Discussion and Technical Support for general software applications and utilities including OS related issues.
User avatar
Ian
Moderator
Posts: 752
Joined: January 1st, 2011, 7:00 am

Re: Read Mail / CRON Jobs

Post by Ian »

Hi Steve,

OK, we've found the problem, now we just need the cure. :thumbup:

Your encrypted home directory is the problem. I've never used one before so am not sure if this problem is solvable or not.

You mention that you can manually run the job via Webmin and it works. Is this AFTER you've manually logged onto the box or does it work regardless of whether you've logged on or not? If the latter then I wonder whether adding a simple "sleep" will be sufficient to work round the problem. So, try adding a "sleep 5" or "sleep 10" or similar to the top of your script, directly underneath the #!/bin/sh line.

So your script will read

Code: Select all

#!/bin/sh
sleep 5
....
....


Does that work?
srb197
Member
Member
Posts: 7
Joined: March 11th, 2011, 11:51 pm

Re: Read Mail / CRON Jobs

Post by srb197 »

Hi Ian,

You are quite right, i can only run the cron job manually after i have logged on as "steve" from the putty window.

The error when run manually before log in reads:

Output from command /var/lib/StartVNC.sh ..

JOB RUN AT Sun Mar 20 17:31:51 GMT 2011
============================

vncserver: Could not create /home/steve/.vnc.


Is it possible to change where the application writes to? Though perhaps now is the time to start again with the server, because i presume this might be a problem when starting other applications/tools on reboot....

Thanks
Steve
User avatar
Ian
Moderator
Posts: 752
Joined: January 1st, 2011, 7:00 am

Re: Read Mail / CRON Jobs

Post by Ian »

Hi Steve,

If you're relaxed about rebuilding your server from scratch then that will probably be the easiest option. Certainly if you intend following my other how-tos then you'll likely hit the problem with an encrypted home folder further down the line.

If you hunt around the internet you can find various how-tos showing you how to remove the encryption on your home folder but having never tried this myself I can't recommend any.

Ian.
srb197
Member
Member
Posts: 7
Joined: March 11th, 2011, 11:51 pm

Re: Read Mail / CRON Jobs

Post by srb197 »

I think i'll do that - will be easier now i have learnt some more! :-) Thanks very much for your help, and great guide as well, its been great to use/learn from it!

Cheers,
Steve
User avatar
Ian
Moderator
Posts: 752
Joined: January 1st, 2011, 7:00 am

Re: Read Mail / CRON Jobs

Post by Ian »

I lost count of the number of times I wiped my OS and started over. That was the reason for the website; to save people the same pain. Never realised encrypting a home folder would cause so many problems. I'll update my guide to warn people of the consequences. I've learnt a lot from the trap you fell into :lol:
Post Reply