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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

failed to open stream: Permission denied

Status
Not open for further replies.

about2flip

Technical User
Nov 21, 2003
31
US
I checked the forum before posting this, and saw a posting but there was no real solution. I am learning to use fopen, and I keep getting

Warning: fopen(exp/runs.txt): failed to open stream: Permission denied in /home/httpd/vhosts/domainname.net/httpdocs/testopen.php on line 2

now here is the code:(studying so I am practicing)
<?
$fp = fopen( "exp/runs.txt" , "w" );
?>

my owner permissions are set to rwx, I also set it to rw.
Group permissions are not checked to nothing, the same for public. Just to play around, I set the public and group to r.

I am using a unix server with plesk. I emailed my hsp, and they said it is a third party issue, and they can not help. So I am hopinig someone here knows.

Thanks in advance for your help.
 
Your webserver will run as a specific user, if it is set up correctly it will not be root. Check under which user the server runs and check the permissions for that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top