Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

writing file on the server...

Posted on 2000-03-30
4
Medium Priority
?
276 Views
Last Modified: 2013-12-25
HI,

I am using Netscape Server on Solaris with cgi. I want to write file on the server from my cgi, issms it does not allow me to create file to the desired directory.

Is there is any setting I am missing or it has to do something with 'rights'.

Please clarify...

Thanx
Ajay


0
Comment
Question by:ajayksh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 1

Expert Comment

by:lambda
ID: 2668729
Could be that you don't have permission to write to that particular directory in the server.
0
 
LVL 10

Expert Comment

by:makerp
ID: 2668967
the directory that your trying to write to needs write permissions for the account that the web server runs under. you may have to also configure the web server so it knows it can write to that dir. to change the control for the web server account speek to your systemn admin
0
 
LVL 16

Expert Comment

by:maneshr
ID: 2669501
when you run a script using CGI, it runs as a process under a given user (typically nobody). Chances are this user does not have the write permission to that directory.

to test this, try running a sample script that you can run from the command prompt & also from the browser.

At the end of each check if a file has been created in that directory.
if the file is created when you run from the command prompt, but not from the browser then my doubts are confirmed.

here is the sample script

=========test.pl
#!/usr/local/bin/perl


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

## the directory must be replaced with your directory name.
open(FILE,">/tmp/test.txt") || die $!;

print FILE "OK\n":

close (FILE);


Hope that helps
0
 
LVL 2

Accepted Solution

by:
saar071697 earned 60 total points
ID: 2837620
try to write the file at the main directory. if it also dont work , it may be that your cgi cannot create files : try to make the file youre self and the try to write to it.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to count occurrences of each item in an array.
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…
Suggested Courses

596 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