Fedora Linux Support Community & Resources Center
Old 2nd June 2012, 05:49 PM
drewdown Offline
Registered User
Join Date: Jun 2012
Location: Chillicothe, Ohio
Posts: 2
PHP Scripts saying No Write Permissions (Advanced)


I am writing in hopes that I can get this issue resolved quickly. I know my way around a server in means that I can generally run through the installation of httpd,php, and mysql.

Although, now I'm having issues.

1. I know it's not secure to be allowing 'root' to login to ftp, etc but I have quick throwaway server that I'm playing with. So for this reason I have allowed root, so that I may skip creating users, etc.

2. I am using /var/www/html as my directory host my scripts.

3. My file permissions are set to 777 on ALL files. Again, unsecure but for what I'm doing it's not an issue of security at the moment.

4. My file ownerships are all set to being 'owned' by root.

5. When I go to the directory to install a php script. The script tells me /var/www/html/script/cachedirectory needs to be set as writable at 777.

6. I double check the file permissions they are set to 777..

7. I went ahead and chown -R apache:apache /var/www/html/script/*

Yet STILL php,apache, or whatever is trying to read the file permissions say they are unreadable.

Please, I am desperate at this point. Can anyone help figure out how to bypass this technical issue.
Reply With Quote
Old 3rd June 2012, 07:57 AM
Posts: n/a
Re: PHP Scripts saying No Write Permissions (Advanced)

Disable SELinux
Reply With Quote
Old 3rd June 2012, 08:59 AM
Fenrin Offline
Registered User
Join Date: Apr 2010
Location: Earth
Posts: 901
Re: PHP Scripts saying No Write Permissions (Advanced)

maybe this helps as well (if you want to keep SELinux enabled):
• chcon -R -h -t httpd_sys_content_t /var/www/html/script
• chcon -R -h -t httpd_sys_script_rw_t /var/www/html/script/cachedirectory
Reply With Quote
Old 3rd June 2012, 11:57 PM
sidebrnz Offline
Registered User
Join Date: Oct 2007
Location: Freedonia
Age: 68
Posts: 3,009
Re: PHP Scripts saying No Write Permissions (Advanced)

What are the permissions on /var/www/html itself? You have to be able to write to the directory itself to be able to create files there.
Registered Linux user #470359 and permanently recovered BOFH.

Any advice in this post is worth exactly what you paid for it.
Reply With Quote
Old 4th June 2012, 12:36 AM
jpollard Offline
Registered User
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 7,346
Re: PHP Scripts saying No Write Permissions (Advanced)

The problem with disabling all security is that any scripts developed will be inherently bad, as they were not developed with the restrictions that should be in place for a production server. This ends up causing the scripts to be rewritten just to try and make them safer, but usually still leaving problems.

It would be better to understand the limitations and controls provided by apache, php, and SELinux.

One issue in changing all ownership in www/html is that is opens the door to having the web site defaced by remote connections, having the scripts themselves replaced...

The protections are there to prevent such things.
Reply With Quote

advanced, chmod, permissions, php, scripts, write

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
Enable Advanced File Permissions Dialog in Nautilus. measekite Using Fedora 0 27th February 2009 03:47 AM
Perl scripts can't get permission to write a file or open a directory though Apache! nonlin Servers & Networking 12 19th November 2008 05:56 AM
Permissions to write to this folder b3n3v3nt3 Using Fedora 3 30th April 2008 10:26 PM
mount iso with write permissions Clunixchit Using Fedora 3 13th January 2006 01:15 AM
Konqueror - Advanced Permissions linkku Using Fedora 2 15th August 2005 07:23 PM

Current GMT-time: 05:02 (Thursday, 21-09-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

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