Welcome to WebmasterWorld Guest from 22.214.171.124
As you can see in my source code, I want to create a directory in /var/www/vhosts/mysite.com/test/ directory. The mode of test directory is 777. But I always receive FALSE. I tried to create a dir in httpdocs/a_tmp_777_dir and it works. Why I couldn't create dir outside the httpdocs directory?
If your server is running php in safe mode, then you can only alter directories that you own.
The doc for mkdir() says:
Note: When safe mode is enabled, PHP checks whether the directory in which you are about to operate has the same UID (owner) as the script that is being executed.
The user of php script is apache. So I even changed the ownership of /var/www/vhosts/mysite.com/test directory into apache. But it still doesn't work.
[edited by: iProgram at 10:45 am (utc) on Nov. 23, 2006]
"Limit the files that can be opened by PHP to the specified directory-tree, including the file itself. This directive is NOT affected by whether Safe Mode is turned On or Off."
Plesk uses open_basedir param by default.