Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 25th February 2009, 09:15 AM
beatlestones Offline
Registered User
 
Join Date: Feb 2007
Posts: 9
PHP - fopen() - Permission denied - even though chmod 755

I am having a nightmare with PHP on my home server at the moment...

I have stipped down the test to the basics and still can't get it to work.

I have a file called test.php stored in /usr/share/data/audio (an aliased directory in apache). This file simply contains the code...
Code:
<?php
 fopen('play.xml', 'w') or die("can't open file");;
?>
The audio folder in which the php file sits has been chmod to 755 (also tried 777). Likewise test.php is chmod to 755.

Any ideas why even with these permissions set I've continuously getting:-

Quote:
Warning: fopen(play.xml) [function.fopen]: failed to open stream: Permission denied in /usr/share/data/audio/test.php on line 2
can't open file
Thanks

EDIT: PS Safe mode in PHP is not on.
Reply With Quote
  #2  
Old 5th October 2010, 09:46 AM
teniemi Offline
Registered User
 
Join Date: Oct 2010
Posts: 1
macosfirefox
Re: PHP - fopen() - Permission denied - even though chmod 755

Hi!

Did you find any answer to this?

I too have chmod 0777 for dir and file, but can't use fopen.
On non fedora system the same code is working fine.
Reply With Quote
  #3  
Old 5th October 2010, 04:08 PM
vallimar Offline
Registered User
 
Join Date: Jul 2008
Posts: 800
windows_xp_2003chrome
Re: PHP - fopen() - Permission denied - even though chmod 755

If you are using selinux, it could be preventing access.
Reply With Quote
  #4  
Old 5th October 2010, 04:25 PM
johno12345's Avatar
johno12345 Offline
Registered User
 
Join Date: Jun 2004
Location: Lancashire, UK
Posts: 332
linuxchrome
Re: PHP - fopen() - Permission denied - even though chmod 755

try chowning the file to apache
Code:
chown apache:apache play.xml
__________________
Running Fedora since FC1, running Redhat since 5(not EL).
Registered Linux user number 485853
Rossendale and East Lancashire (UK) LUG http://www.rosslug.org.uk
Reply With Quote
Reply

Tags
755, chmod, denied, fopen, permission, php

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Permission Denied T3256 Using Fedora 24 22nd September 2008 03:49 AM
permission denied alin19 Using Fedora 6 9th July 2008 04:41 PM
Permission denied?? lch3920126 Using Fedora 2 18th November 2006 06:52 AM
scp - permission denied emamm Servers & Networking 5 22nd August 2006 03:38 PM
Permission Denied kushboy Using Fedora 3 9th August 2004 05:27 AM


Current GMT-time: 16:52 (Sunday, 19-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat