Re: User when script uploads a file?

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

 



On Tue, 2015-04-07 at 12:54 -0700, Jeffry Killen wrote:
> Hi again;
> 
> I have a CMS that I use locally for dev purposes.
> 
> It has a facility for creating a sub directory with the name pattern:  
> lab_#
> 
> Within each lab_# are directories like lab_#/css, lab_#/js, lab_#/php,
> So I want to upload a file into dev_labs/lab_8/php and the php dir
> has permissions set to 0755 ( web server user is the owner because
> a php script created the dir and sub dirs).
> 
> Uploading to the target dir fails with the error write permission  
> denied.
> 
> So when a file is uploaded via a php script  who is the user? (in  
> Apache on MacOSX, or any version of a unix system)
> 
> Thanks in advance for info
> JK
> 

If PHP is responsible for handling the file upload then uploads are
under the user that Apache (or your web server of choice) is running as.
Typically the uploads go to your /tmp directory and are then moved out
by your scripts, but there are directives in Apache to change this
behavior.

I see you have a PHP script create the lab_# directories, but what about
the sub-directories within that? If PHP isn't also creating those, it
could lead to some issues with permissions.

Do you have some sample code that can illustrate the issue, as that
would help highlight any issues that might not be related to
permissions.

Thanks,
Ash

http://www.ashleysheridan.co.uk




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[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