apache webserver permission denied to write into directory.

Posted on 2005-05-12
Last Modified: 2013-12-15
hi all,

I'm having problem with my apache server to wirte into directory using php script. I'm trying to use the  "PHPROJEKT application" how can i fix it.
this is the error when i run the script..

[path] =   http://localhost/phprojekt/setup.php

[error ]
Alert: Cannot create file ""!
The webserver needs the permission to write the file in the PHProjekt root directory.  
Question by:asdad_uly21

    Author Comment

    i for got,
    I'm using fedora core 3, php 4.3, apache 2.0

    LVL 38

    Expert Comment

    apache 2.0 run by user "apache".
    So please do
    chown -R apache /path-to-PHPorjeckt-root
    chmod -R u+w /path-to-PHPorjeckt-root

    Author Comment

    i've been doing that but the application still not working..

    this are the following command that i been used:

    chown -R apache;apache /path-to -PHProjekt
    chown -R apache;root /path-to -PHProjekt
    chown -R root;apache /path-to -PHProjekt
    chown -R root;root /path-to -PHProjekt

    chmod - R 755  PHProjekt
    chmod - R 775  PHProjekt and even the 777 permission

    didnt work.. what should i do next.  do i need to check the php.ini of the php language
    LVL 9

    Accepted Solution

    chown -R apache.apache and not apache;apache as you have stated in your response above.
    Note I have separated the apache and apache with a dot and not semi-colon as you have done.

    Then see the result.

    Author Comment

    sorry for the typographical error. i did the correct command.

    but anyway i solve the problem. in Fedora Core 3 their is a SELinux. this application is not permitting the apache to write within the directory or files. i just disable the security for apache 2.0.

    thanks anyway for the help....  

    Author Comment

    requesting to delete this question by the community support.


    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
    How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now