Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8579487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:36:59+00:00 2026-06-11T20:36:59+00:00

I have installed fedora15 on my system, installed apache and php5.3 and mysql. I

  • 0

I have installed fedora15 on my system, installed apache and php5.3 and mysql. I have not changed any default setting in any configuration files

Created one ftpuser and uploaded files to Documentroot which is ‘/var/www/html/’ and when I run php files all the files runs successfully.

But when it comes to file-uploads, fopen, fwrite, imagemagick convert etc all the programs which involve creation of files programatically does not work. I have given 777 permissions to the folder where I run the php scripts but still it gives me the access denied error.

Below is a sample code which creates permission denied error.

    $handle =   fopen("test.txt","w+");
    if(!$handle)die("Could not open file for writing");
    fwrite($handle,"Testing Uploads Successfull.");
    fclose($handle);

The above file is located in ‘/var/www/html/test/’ directory of my newly installed fedora15 system.

Though if I run this file as a root user using php command line it executes correctly creating a new file and the text inside it. If I run the same file in command line with another user it produces permission denied error, though the directory has got 777 permission over it.

Please any one help me with this wierd behaiour,

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:37:00+00:00Added an answer on June 11, 2026 at 8:37 pm

    SELinux is preventing the web server from creating and writing to files. See the httpd_selinux(8) man page for more details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have installed xampp on Windows7(64bit).I want to work with PHP, Apache and MySql.
I have installed PHP and its not working in the Apache Webserver. Steps followed
We have installed OpenDataKit (ODK) Aggregate and we are using a MySQL Database. I
I have installed Eclipse Indigo on Ubuntu 11.10, and the marketplace is not showing
I have installed mySQL using sudo apt-get install mySQL-server then i have installed libmysqlclient15-dev
I have an existing large(ish) PHP web app (using Apache and MySQL) which now
I have installed gitorious ruby application, configured apache passenger and vhost. Everything works fine
I have installed ruby 1.9.3p194 using rvm on ubuntu 12.04. Its not at home(~/.gemrc)
I have installed mysql Query browser for creating tables/ views/ procedures (In Ubuntu) But
I have installed a drupal-commons. During the install it shows lots of too-many-files-open-errors. (guess

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.