Re: Permission Denied - Help Requested

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

 



>
> Thanks.
>
> What do you see if you run this?   "Can't open or create file!"
>
> Ethan


OK,

If you're running PHP as an Apache module, by default it won't have
permissions to write to the directory (this is by design to avoid security
issues.) You can do something like the following:


   1. Create a directory for writing files outside of your public directory
   (let's call it "uploads".)
   2. Change the group associated with the directory to Apache:
   sudo chgrp -R www-data /home/username/path/to/uploads
   3. Change the permissions on the directory so the group has write
   permissions:
   sudo chmod -R 2775 /home/username/path/to/uploads
   4. Then try the script again.

See if that works.

Adam

-- 
Nephtali:  A simple, flexible, fast, and security-focused PHP framework
http://nephtaliproject.com

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux