Can't write to a text file through CGI-Perl

K

Kishore

Hi,

I have perl program and it writes some data to a text file that is in
cgi-bin/log. And this file does not exist. So the program creates it
and then writes to it.

When I run the perl program from shell it creates and writes to the
text file fine.

But when I run the same program from http as a cgi, it gives me an
error saying that I do not have permission to create or write to this
file.

The cgi-bin has 0755 and log directory in cgi-bin also has 0755
permission settings.

Is there anything else I should do.

When I run from shell, I login as root.

Thanks for your help in advance.

Kishore.
 
J

Jürgen Exner

Kishore said:
I have perl program and it writes some data to a text file that is in
cgi-bin/log. [...]
When I run the perl program from shell it creates and writes to the
text file fine.

Then it is extremely unlikely that you have a Perl issue.

[...]
Is there anything else I should do.

You should read the FAQ, in particular "perldoc -q 500"

jue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top