I am using symlinks to share the WordPress core directory. It is working in my local machine, but when I try to deploy it on my Plesk server owned by Rackspace I have some right issues because the shared folder can’t have two allowed user to access it via PHP. Indeed I have the following error:
[Thu Jul 09 10:08:53 2015] [error] [client 74.125.45.136] PHP Warning: require() [<a href='function.require'>function.require</a>]: SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /var/www/vhosts/mysite2.com/blog/wordpress/wp-blog-header.php owned by uid 10004 in /var/www/vhosts/mysite2/blog/index.php on line 17, referer: http://www.mysite2.com/blog/
I do not have this error with mysite1.com/blog because the user owning the wordpress folder is mysite1ftp such as:
drwxrwsr-x 69 mysite1ftp group 4096 Jul 9 09:12 mysite1.com
drwxrwsr-x 44 mysite2ftp group 4096 Jul 8 16:53 mysite2.com
drwxrwsr-x 5 mysite1ftp group 4096 Jul 2 11:15 wordpress
Do you think there is any solution to do that? How can the wordpress folder be accessible by both mysite1ftp and mysite2ftp?
2
Answers
Assuming all the installs are on the same instance and thus can have the same files shared between them, then the main thing you need to do is to have all the custom content stuff live outside of the main WordPress folders.
check,
The problem you’re encountering is that Rackspace has enabled Safe Mode. This is an archaic and fairly ineffective means of securing PHP installations. If you control the configuration of the Plesk server, the “best” solution would be to switch to PHP-FPM, or at least mod-ruid2. Without disabling Safe Mode, the PHP interpreter will not evaluate scripts owned by different users in the same request, which inherently at odds with what you’re trying to accomplish.