• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

Directories permissions in different domains for the same application

PaulinoM

New Pleskian
Folks,

I have a bad situation that's I can't find a solution.

The scenario:

I have 3 real domains (not aliases or parked): domain1, domain2 and static-domain. In domain1 and domain2 I have 2 websites running over WordPress and the static-domain I just use to put static files, e.g. javascript files, themes images, css files. This is a cookie-free domain.

I would like to use the static-domain to host the images of my texts from domain1 and domain2 but here my problems begin.

Wordpress put those files inside of wp-content/uploads directory but is possible to change to another directory, including directories outside of your structure.

I've try to change it pointing the destination to the static-domain httpdocs directory but when I try to upload an image, I receive the message that's Wordpress can't create a directory (to match my distribution system using year/month/day directories).

I try to change the permissions of this directory for any combination, including 777. I try to change the owner and group to the same owner/group of the domain1 and don't solve the situation. I try to put the users of both domains inside of the apache group and don't solve the problem. I really try a lot of different approaches but nothing happen and nothing solve this problem.

So, I ask for the forum for any clue or a different approach to my situation. Any idea is really welcome.

Thank you
 
PHP will NOT allow you to run a script on one site on your server and then write a file from that script on another site. This is a built in protection against cross site scripting. The function open_basedir prevents you from having write access on another vhost on the server.

At least what I am trying to say is that the way WordPress does things, i think you are stuck.
 
Last edited:
Back
Top