I have a script that has to traverse a path to get to a file to open 
it. I do not own that file but the permissions are set to 644, so 
I should be able to open it with my script. When I run the 
script with the web browser, I get "No such file or directory".

But when I run the script from the console like,
"perl myscript.cgi"
it opens the file and reads it.

Does the script need special permission to see the file 
and directory, when run through the web browser ??

The directory I'm running the script from is something like 
this:

/sectiona/section1/section2/section3/section4/

but the path to the file I'm opening is:

/sectionb/section1/section2/section3/section4/section5/

and here is some code:

#!/usr/bin/perl

print "Content-type: text/html\n\n";

open(INF,"/sectionb/section1/section2/section3/section4/section5/somefile.txt") or 
dienice("Couldn't open somefile.txt for reading: $! \n");
@data = <INF>;
close(INF);



When I cd .. beyond /sectiona or /sectionb I get:

/ 

so I'm pretty sure I'm at the root directory.

Does anyone know why it works from the console and not with a web browser ??

Thanks,
~



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to