Re: SAFE MODE Restriction - mkdir()

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

 



SED wrote:
It just seems not making sence. I have read the manual and it does not
explain this specially.

If the user owns this folder: "www\myfolders"

And runs a PHP-script in safe mode that creates the folder
"www\myfolders\who".

Who owns the "who" folder?

If the webserver is run under user nobody, then "who" folder is owned by user nobody. Only root can change owners so there's no way around it.



I assume the owner. If so, why can't the PHP-script create another folder inside like "www\myfolders\who\this" like before?

Webserver running under user nobody reads in your script owned by you. PHP has safe mode on, so everytime it creates a file or directory it checks if the owner of the parent directory is the same as the owner of the php script being executed. If it's not, it issues an "SAFE MODE Restriction in effect" error.




If "the user of the php process" (UID) is the owner of the new folder, why can't it create a folder inside its own folder? Is it because it's triggered by a user different from the user of the PHP process?


-- 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