Solved

CGI-script file creation

Posted on 1997-06-18
1
154 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need script to search multiple files in one drive 13 58
Selecting Right Partition 6 82
Review of the nodejs code 1 36
what should i learn? javascript or typescript? 3 37
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
This article will show, step by step, how to integrate R code into a R Sweave document
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

733 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