Solved

writing file on the server...

Posted on 2000-03-30
4
264 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 30 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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
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…

705 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