| Author |
Message |
tofu
Joined: 01 Jul 2006
Posts: 27
Location: Ghent, Belgium
|
| Posted: Sun Sep 23, 2007 11:17 am Post subject: Unable to open env file |
|
|
Since a couple of weeks I'm getting a very strange error in my logs:
Quote: Sep 23 16:02:43 tufus CRON[2444]: pam_env(cron:setcred): Unable to open env file: /etc/environment: No such file or directory
Sep 23 16:09:04 tufus CRON[3554]: pam_env(cron:setcred): Unable to open env file: /etc/environment: No such file or directory
Sep 23 16:09:04 tufus CRON[3554]: pam_env(cron:setcred): Unable to open env file: /etc/environment: No such file or directory
Sep 23 16:12:01 tufus CRON[3599]: pam_env(cron:setcred): Unable to open env file: /etc/environment: No such file or directory
Sep 23 16:12:02 tufus CRON[3599]: pam_env(cron:setcred): Unable to open env file: /etc/environment: No such file or directory
Sep 23 16:17:01 tufus CRON[3660]: pam_env(cron:setcred): Unable to open env file: /etc/environment: No such file or directory
Sep 23 16:17:01 tufus CRON[3662]: pam_env(cron:setcred): Unable to open env file: /etc/environment: No such file or directory
Sep 23 16:17:01 tufus CRON[3660]: pam_env(cron:setcred): Unable to open env file: /etc/environment: No such file or directory
Sep 23 16:17:03 tufus CRON[3662]: pam_env(cron:setcred): Unable to open env file: /etc/environment: No such file or directory
Sep 23 16:26:01 tufus CRON[3775]: pam_env(cron:setcred): Unable to open env file: /etc/environment: No such file or directory
Sep 23 16:26:02 tufus CRON[3775]: pam_env(cron:setcred): Unable to open env file: /etc/environment: No such file or directory
Sep 23 16:39:02 tufus CRON[4007]: pam_env(cron:setcred): Unable to open env file: /etc/environment: No such file or directory
Sep 23 16:39:02 tufus CRON[4007]: pam_env(cron:setcred): Unable to open env file: /etc/environment: No such file or directory
Sep 23 16:40:01 tufus CRON[4022]: pam_env(cron:setcred): Unable to open env file: /etc/environment: No such file or directory
Sep 23 16:40:04 tufus CRON[4022]: pam_env(cron:setcred): Unable to open env file: /etc/environment: No such file or directory
Sep 23 17:02:05 tufus CRON[4146]: pam_env(cron:setcred): Unable to open env file: /etc/environment: No such file or directory
What can I do to solve the problem? :roll: |
|
| Back to top |
|
tofu
Joined: 01 Jul 2006
Posts: 27
Location: Ghent, Belgium
|
| Posted: Sun Sep 23, 2007 11:21 am Post subject: |
|
|
This is my root cron, so the error happens everytime a cron is started? Quote: # m h dom mon dow command
12 * * * * perl /var/www/awstats.tufus.info/web/cgi-bin/awstats.pl -update -config=5ib2.be >> /dev/null 2>&1
17 * * * * perl /var/www/awstats.tufus.info/web/cgi-bin/awstats.pl -update -config=tufus.info >> /dev/null 2>&1
40 * * * * perl /var/www/awstats.tufus.info/web/cgi-bin/awstats.pl -update -config=saai.be >> /dev/null 2>&1
26 * * * * perl /var/www/awstats.tufus.info/web/cgi-bin/awstats.pl -update -config=gottasport.com >> /dev/null 2>&1
* 5 * * * /usr/bin/php5-cgi /var/www/saai.be/cron-dagelijks.php >> /dev/null 2>&1
09 00 * * Sun rm /var/www/cache/*/* -d -r
|
|
| Back to top |
|
astrashe3
Joined: 05 May 2007
Posts: 29
|
| Posted: Sun Sep 23, 2007 2:44 pm Post subject: |
|
|
Which distro are you using? Debian?
It sounds to me like cron is looking for /etc/environment, so that it has things like PATH when it runs your cron jobs.
I don't have the file on my debian stable linode, and cron works fine for me. But according to this thread at google groups, debian installers have been creating the file since 2002 or so:
http://tinyurl.com/3y93mo
That thread also says that the problem surfaced after upgrading PAM stuff to the packages in testing. I think it's a recent thing.
On my ubuntu box at home, the /etc/environment file is:
Code: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games"
LANG="en_US.UTF-8"
Here's the ownership and permission info:
Code: -rw-r--r-- 1 root root 111 2007-04-15 11:15 /etc/environment
Maybe this is something wonky in the default linode debian install. |
|
| Back to top |
|
tofu
Joined: 01 Jul 2006
Posts: 27
Location: Ghent, Belgium
|
| Posted: Sun Sep 23, 2007 4:23 pm Post subject: |
|
|
Thanks for your reply! Yes, I'm running Debian Unstable (Lenny?).
My installation is from a date later then 2002, so it's very strange the file is missing. I will try to make the file manual. I leave the LANG attribute, I read that that's saved somewhere else now.
I checked all the directory's, and I have them all. Also the X11 and the games directory :?. So now I created a file like this:
Quote: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games" I let you know what it does. |
|
| Back to top |
|
tofu
Joined: 01 Jul 2006
Posts: 27
Location: Ghent, Belgium
|
| Posted: Mon Sep 24, 2007 10:31 am Post subject: |
|
|
Problem solved :P.
I will try to remove the PATH, so with an emty file, but now it's working. Thanks! |
|
| Back to top |
|
Ciaran
Joined: 13 Feb 2004
Posts: 138
Location: England, UK
|
| Posted: Wed Sep 26, 2007 1:12 pm Post subject: |
|
|
tofu wrote: Thanks for your reply! Yes, I'm running Debian Unstable (Lenny?).
FWIW, Lenny is the current testing branch. The unstable branch is, and will always be known as, Sid. |
|
| Back to top |
|
tofu
Joined: 01 Jul 2006
Posts: 27
Location: Ghent, Belgium
|
| Posted: Wed Sep 26, 2007 1:22 pm Post subject: |
|
|
Thanks for that information.
I said Lenny because phpSysInfo told me that :wink:. But I see it's also speaking about Sid. |
|
| Back to top |
|
| |