[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dbmopen suddenly broken



on 2/9/2000 3:52 AM, Simon Cozens at simon@brecon.co.uk wrote:

> On Tue, Feb 08, 2000 at 09:00:51PM -0600, David Blache wrote:
>> Error (from cron):
>> No write permission to ndbm file at /home/brain/infobot/src/DBM.pl line 104,
> 
> This means that you... uhm, don't have permission to write to that file.
> Are you running the cron job as the correct user? Check the permissions on
> the database file.
> 
> 
> Simon

uhm, I dunno, you tell me:

[brain@brainsbox infobot]$ ls -al
total 1921
drwxrwxr-x   7 brain    brain        1024 Feb  8 22:24 ./
drwx------  21 brain    brain        1024 Feb  8 21:45 ../
-rwxrwxrwx   1 brain    brain      188416 Feb  8 21:55 Brain-are.db*
-rwxrwxrwx   1 brain    brain       20480 Feb  8 21:56 Brain-ignore.db*
-rwxrwxrwx   1 brain    brain     1449984 Feb  8 21:55 Brain-is.db*
-rw-rw-r--   1 brain    brain      142958 Feb  8 22:24 Brain-is.dump.txt
-rwxrwxrwx   1 brain    brain       20480 Feb  6 22:48 Brain-karma.db*
-rwxrwxrwx   1 brain    brain      122880 Feb  8 21:56 Brain-seen.db*
drwxr-xr-x   2 brain    brain        1024 Feb  6 22:48 doc/
drwxr-xr-x   2 brain    brain        1024 Feb  6 22:48 factpacks/
drwxr-xr-x   2 brain    brain        1024 Feb  7 05:34 files/
-rwx---r--   1 brain    brain        2044 Feb  7 00:03 infobot*
drwxr-xr-x   2 brain    brain        1024 Feb  7 05:58 scripts/
drwxr-xr-x   3 brain    brain        1024 Feb  8 21:54 src/

[brain@brainsbox infobot]$ crontab -e

shows this:

0-59/1 * * * * /home/brain/infobot/scripts/runbrain.sh > /dev/null

[brain@brainsbox scripts]$ pwd
/home/brain/infobot/scripts

[brain@brainsbox scripts]$ ls -al
total 15
drwxr-xr-x   2 brain    brain        1024 Feb  7 05:58 ./
drwxrwxr-x   7 brain    brain        1024 Feb  8 22:24 ../
-rw-r--r--   1 brain    brain         879 Feb  6 22:48 README.scripts
-rwxr-xr-x   1 brain    brain        1209 Feb  6 22:48 curl*
-rwxr-xr-x   1 brain    brain         629 Feb  6 22:48 dump_db*
-rwxr-xr-x   1 brain    brain         329 Feb  6 22:48 get_stuff.pl*
-rwxr-xr-x   1 brain    brain         303 Feb  6 22:48 makepasswd*
-rwxr-xr-x   1 brain    brain         312 Feb  6 22:48 runbrain.sh*
-rwxr-xr-x   1 brain    brain         840 Feb  6 22:48 track2fact.pl*
-rwxr-xr-x   1 brain    brain        2251 Feb  6 22:48 unupdate_dbs*
-rwxr-xr-x   1 brain    brain        1100 Feb  6 22:48 update_db*

[brain@brainsbox scripts]$ more runbrain.sh
#!/bin/sh
COUNTTASKS=`ps x | fgrep perl | fgrep infobot | wc -l`
#echo $COUNTTASKS
if [ "$COUNTTASKS" -lt 1 ]; then        # Brain's messed up
#       nohup /home/brain/infobot/infobot >/dev/null 2>&1 &
#       /home/brain/infobot/infobot &
        /home/brain/infobot/infobot > /home/brain/brain.tty &
        logger "Brain was restarted."
fi

As far as I can tell it isn't me/brain that is being denied write access to
the file, but the perl script itself (DBM.pl).  I'm at a loss here.

-David