1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Directories permissions in different domains for the same application

Discussion in 'Plesk 11.x for Linux' started by PaulinoM, Sep 5, 2012.

  1. PaulinoM

    PaulinoM New Pleskian

    10
    35%
    Joined:
    Aug 29, 2012
    Messages:
    6
    Likes Received:
    0
    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
     
  2. ZopfWare

    ZopfWare Regular Pleskian

    25
    57%
    Joined:
    May 30, 2004
    Messages:
    215
    Likes Received:
    0
    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: Sep 5, 2012
Loading...