Solved

CGI-script file creation

Posted on 1997-06-18
1
139 Views
Last Modified: 2013-12-25
Is it abnormal for a CGI (PERL) script to be unable to create a new file?  

I am experiencing some trouble with my web server in that my cgi-scripts cannot write to files that do not already exist.  Even if the target file is in a directory with world read/write permissions.  

If this is abnormal, what should I say to my webmaster to try to solve the problem?
0
Comment
Question by:cprice
1 Comment
 

Accepted Solution

by:
david_z earned 30 total points
ID: 1828338
It obviously depends on exactly how you are trying to create these new files - it could just be an error in your Perl script that is making these files NOT be created. However, there are some reasons that would cause this to happen.

As you know, when you execute a CGI script, most often it is being executed as the user WEB. Now, because of the anonymous nature of the user WEB (there is no login needed) - many Unix Admins carefully administer the access that WEB has.

It is possible, on certain Unix flavors, to disallow write access to the user WEB regardless of the chmod settings given to a file or directory.

Perhaps you should check with your Web Master and make sure there are no such restrictions.

Also, just try a simple Perl write for your CGI script:

open (TEST, ">test");
print TEST "This is a test";
close(TEST);

and see if that works - because if it does - then it means you DO have write access - and your code is bad somehow.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now