[rt-users] opening a file for writing

Matthew Frick mfrick at learnedsolutions.com
Wed Aug 1 23:38:36 EDT 2001


This is probably not an rt specific problem but a problem I am getting in
trying to modify one of the perl files involved in rt.

the modifications I am making involves opening a plain text file for reading
which is fine but then opening it for writing later in the script which is
failing.

file being modified is /usr/local/rt/lib/rt/database/manipulate.pm

it is opening text file for reading (successfully)
/usr/local/textfiles/XXX.txt
but can not open the same file for writing.

XXX.txt has been set to chmod 775 and even tried at 777 to no avail

commands being used are

open FILE, $textfile or die "Cannot open $stuff for read: $!";      #this is
successfull
close (FILE);

and ....

open FILE, >>$textfile or die "Cannot open $tutorfile for write : $!";
#this is unsuccessfull
close (FILE);


I have tried with ownership rt:rt, root:root and even nobody on the text
file any suggestions from the guru's out there


btw. this is on linux 7.1

thanks

matthew frick





More information about the rt-users mailing list