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!

Getting permission denied error when trying to open a file

Status
Not open for further replies.

tibberous

Programmer
Nov 2, 2006
8
0
0
US
Using a very simple line:

open (DATEI, ">test.txt") or print ("Can not open file : $!");

Test.txt does not exist, I'm trying to create it.

Program returns: Can not open file : Permission denied

And the folder has 777 permissions.

I even tried setting the GID and UID bytes - doesn't change anything. I am running perl as CGI, because it needs to work with an old script that uses an old version of mod cgi.

Does anyone know how I can fix this?
 
Give the full path to the file to start with.
/path/to/test.txt

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
 
you have 777 on your cgi-bi directory, bad idea

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top