[Tfug] writing files from PHP

Paul Scott waterhorse at ultrasw.com
Thu Jun 19 10:20:04 MST 2008


Matt Jacob wrote:
> Paul Scott wrote:
>   
>>> If you're unsure of the uid, open the directory permissions to 777,
>>> touch() a new file (so that it's created), and set the directory mode
>>> back to something sane.  Look at the file owner to see the uid.
>>>       
>>  From a php script?  When I touch a new file from the CLI it works fine 
>> and I own the file. 
>>     
>
> It has to be from a script executed by Apache so that you can see which 
> user httpd is running as. One would hope that you're the owner of a file 
> you manually created from the shell. :-)
>   
Yep!!
> Let's incentiveize this: first one to solve the problem is getting a 
> beer on Paul tonight. :-P
>   
That's a deal!

Thanks,

Paul





More information about the tfug mailing list