Re: [users@httpd] Allow php scripts to create directories+files..

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

 



> On 8/22/06, mb2@xxxxxxxxxxxxxxxx <mb2@xxxxxxxxxxxxxxxx> wrote:
> >We have a shared hosting platform, and have a requirement to allow php
> >scripts to create directories+files - Problem is that php is run under
> >apache user (www-data), and the users directories are owned by the
> >user, so php script is getting permission denied...We could chmod 777
> >on the directory, but I was hoping there was a more secure alternative?

On 22.08.06 18:03, Joshua Slive wrote:
> Two options:
> 
> 1. Run php as a CGI under suexec.
> 
> 2. Give ownership of the relevant directories to www-data and use
> php's safe mode.  (But be sure to recognize its limitations.)

3. run with umask 002 and allow writing to group apache runs as, relax
safe_mode checking to GID.

4. use PHP's FTP commands - php scripts will log via FTP and create
directories and upload files.

-- 
Matus UHLAR - fantomas, uhlar@xxxxxxxxxxx ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
- Have you got anything without Spam in it?
- Well, there's Spam egg sausage and Spam, that's not got much Spam in it.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux