Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGI: File write permissions difficulty

Status
Not open for further replies.

JNameNotTaken

Programmer
Aug 29, 2006
24
0
0
IE
Hi All

I'm using windows XP ftp thing to change file permissions on a file I wish to write to from a cgi script.

The only way i can get the script to actually read and write to the file is to open all permissions.
This means that sombody can simply go to the URL and view the contents of the file. I do not want this.
Is there a way I can set permissions to block users other than the script and myself from modifying or viewing the file?

The file is not in the CGI-bin folder.

Thanks so much for any help you can provide.
 
generally a script can write to files with as little as 600 (owner read/write) permissions because the script runs as owner. But the server you are using might be setup differently.

- Kevin, perl coder unexceptional!
 
Thanks KevinADC

I have been able to relax the permission to an extent, I still find that I have to allow all users write access to the file in order to let the script write to it. I can live with that I think though. I don't see how anybody could write to it without being logged into the ISP account.

Thanks for your reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top