[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: perl script not writting to file



On Wed, 11 Oct 2000 12:26:05 +0530, Arvind Devarajan said:

> hi,
>      this is most probably because the web server in your system is run
>  as the user "nobody" - well, apache on default runs that way. And, the
>  file that you've created might not be belonging to "nobody" - or any
>  user that your web server is running as.
>  Two solutions, could be:
>  
>    1. Re-start web server with your user id (this might require admin
>	priveliges"
>    2. Create the file in your CGI script itself.
>  
It is always better to run apache (httpd) as user nobody from security
reasons. If you want the file to store data read/write to it with CGI
script then create subdir with owner.group as nobody.nobody. Script can
access it. 

If you want any other user permissions then you can use following as
first line of script instead of usual '#!/usr/bin/perl'

Read perl docs for 'suidperl' 


>  Shubhendu wrote:
>  
>  > hi all
>  >
>  >	      i have recently started perl/cgi, i m traying to write
>  > some data ,got from cgi program in a file thorugh perl script ,
>  >
>  > if file permitions are set 766 (i.e. write permition for all )
>  > then the program works fine otherwise it writes nothig in file
>  >
>  > what should i do ?
>  >
>  > is it possible to do it with SSI if yes WHO ?
>  >
>  > shubh
>  >
>  > ---------------------------------------------
>  > The mailing list archives are available at
>  > http://lists.linux-india.org/cgi-bin/wilma/LIP
>  
>  
>  ---------------------------------------------
>  An alpha version of a web based tool to manage
>  your subscription with this mailing list is at
>  http://lists.linux-india.org/cgi-bin/mj_wwwusr
>  

-- 
Deepak Joglekar

deepak@xxxxxxxxxxxxx