Current time: 11-29-2024, 12:12 PM Hello There, Guest! (LoginRegister)


Post Reply 
Permission to write in other directory
Author Message
Euforia Offline


Posts: 2
Joined: Aug 2008
Reputation: 0
Post: #1
Permission to write in other directory
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!
(This post was last modified: 08-15-2008 12:37 AM by Euforia.)
08-15-2008 12:36 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #2
RE: Permission to write in other directory
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...
08-15-2008 01:38 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)