ispCP - Board - Support
Permission to write in other directory - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: Usage (/forum-34.html)
+--- Thread: Permission to write in other directory (/thread-4044.html)



Permission to write in other directory - Euforia - 08-15-2008 12:36 AM

Hi there,

I have a (private) server running ispCP 1.0.0 RC4 OMEGA build: 20080316. There are serveral websites running on them which i all administrate.

The problem: I want to execute a php file in /var/www/virtual/website.com/htdocs/upload.php which uploads a image to /var/www/virtual/otherwebsite.com/htdocs/picturedir

Logically this gives errors due to suexec and DocumentRoot?

How can i solve this?


Thanks!


RE: Permission to write in other directory - kilburn - 08-15-2008 01:38 AM

Assuming that "otherwebsite.com" never modifies the images after being uploaded through "website.com":

1. Modify the open_basedir directive in "/var/www/fcgi/website.com/php5/php.ini" so that it can access "/var/www/virtual/otherwebsite.com/htdocs/picturedir", and restart apache
2. Give world exec permissions (chmod o+x) to "/var/www/virtual/otherwebsite.com" and "/var/www/virtual/otherwebsite.com/htdocs"
3. Change ownership of "picturedir" to the user of "website.com" (vuxxxx)
4. Change the group of "picturedir" to "www-data".
5. Set the group suid bit on "picturedir" and allow reading to www-data user (chmod g+srx) so files created inside use the "www-data" group too.

Hope this helps...