cancel
Showing results for 
Search instead for 
Did you mean: 

Error append to new log file.

ng_7
Regular Advisor

Error append to new log file.

hi, can anyone explain on this ?
just don't understand on the below,

below are my backup scripts :

echo "FBACKUP Start on `date`" >> /home/applprod/fbkp.log
fbackup -f /backup/prod -i /prod -I /tmp/index
echo "FBACKUP Completed on `date`" >> /home/applprod/fbkp.log

and the permission for fbkp.log is as below :
-rw-rw-rw- 1 oraprod dba 0 Jun 7 16:40 fbkp.log

but i still can't append to this log, pls look at my /var/mail/root
/home/oraprod/dbackup.sh: /home/applprod/fbkp.log: Cannot create the specified file.
fbackup(1004): session begins on Thu Jun 14 02:30:00 2007
fbackup(3024): writing volume 1 to the output file /backup/prod
fbackup(3055): total file blocks read for backup: 165949524
fbackup(3056): total blocks written to output file /backup/prod: 166114792
/home/oraprod/dbackup.sh[3]: /home/applprod/fbkp.log: Cannot create the specified file.

thanks
ng






3 REPLIES
A. Clay Stephenson
Acclaimed Contributor

Re: Error append to new log file.

The ability to create a new file is determined by the write permission of the directory --- not the file itself. Make sure that the effective user of the script has read and search permission on all of the directories above the applprod directory and is also able to write to the applprod directory.
If it ain't broke, I can fix that.
Warren_9
Honored Contributor

Re: Error append to new log file.


Hi Ng,

"/home/oraprod/dbackup.sh: /home/applprod/fbkp.log: Cannot create the specified file."

As you can see that there has an error in create the logfile,

Please double check on the file path and the directory permission of the logfile.

GOOD LUCK!!
Dennis Handly
Acclaimed Contributor

Re: Error append to new log file.

>Clay: The ability to create a new file is determined by the write permission of the directory

Right. If applprod owns that directory, he can create the file and later root can write to it.
(You show it exists, so it must be an issue with permissions on each directory in the file's path.)

So you need to show:
$ ll -d /home/applprod/

(Hopefully you don't have to look at /home/. :-)