Re: PHP Warning: Failed to open stream: Permission Denied

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2008-05-07 at 17:45 -0500, Matthew Benjamin wrote:
> 
> 
> On Wed, May 7, 2008 at 2:52 PM, Patrick O'Callaghan
> <pocallaghan@xxxxxxxxx> wrote:
>         
>         On Wed, 2008-05-07 at 09:57 -0500, Matthew Benjamin wrote:
>         >
>         >
>         > On Wed, May 7, 2008 at 9:47 AM, Tim Evans
>         <tkevans@xxxxxxxxxxx> wrote:
>         >
>         >         Matthew Benjamin wrote:
>         >
>         >         > $myFile = "./text.txt";
>         >
>         >         I would suggest a full path here instead of a
>         relative one, to
>         >         a directory
>         >         you know is writable by the apache user.
>         >         --
>         >         Tim Evans, TKEvans.com, Inc.    |   5 Chestnut Court
>         >         UNIX System Admin Consulting    |   Owings Mills, MD
>         21117
>         >         http://www.tkevans.com/         |   443-394-3864
>         >         http://www.come-here.com/News/  |
>         tkevans@xxxxxxxxxxx
>         >
>         >
>         >         --
>         >         fedora-list mailing list
>         >         fedora-list@xxxxxxxxxx
>         >         To unsubscribe:
>         >         https://www.redhat.com/mailman/listinfo/fedora-list
>         >
>         >
>         > That did not work. Here is an example of my directory
>         structure
>         >
>         > drwxrwxrwx  2 apache   apache   4096 May  7 09:50 .
>         > drwxr-xrwx   5 apache   apache   4096 May  6 10:40 ..
>         > -rwx-w--w-    1 apache   apache    947 May  7 09:50
>          text.txt
>         
>         
>         If this is a direct cut-and-paste from your terminal, it looks
>         from here
>         like text.txt has an extra space before it, i.e. it's "
>         text.txt". Of
>         course that may be an artefact.
>         
>         poc
>         
>         --
>         
>         fedora-list mailing list
>         fedora-list@xxxxxxxxxx
>         To unsubscribe:
>         https://www.redhat.com/mailman/listinfo/fedora-list
>         
> 
>  
> it's not just a mistake. I can write and read to the file if it is
> already created. I just can't create the file if it does not exist.

Remember that it's not only necessary for the apache user to have write
permission on the directory (which it appears to have) but search ('x')
permission on every directory above it back to '/',
i.e. /var/www/html/dir1/dir2, /var/www/html/dir1, /var/www/html etc.

poc


-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux