[solved] Moving Data Directory

Home Forums Troubleshooting Install & Upgrade [solved] Moving Data Directory

This topic contains 4 replies, has 2 voices, and was last updated by Profile photo of Patrick patrickc2 1 year, 5 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #96026
    Profile photo of Patrick
    patrickc2
    Participant

    Hello,

    I’m trying to move my data directory out of the site root folder for security reasons.
    Looking over the forums, these three posts are relevant, but each suggests different changes and none of them are very clearly resolved.

    https://pydio.com/forum/f/topic/moving-data-directory-outside-root-and-public_html/
    https://pydio.com/forum/f/topic/moving-data/
    https://pydio.com/forum/f/topic/move-data-directory/

    Could we get some definitive answer about the process for moving the Data directory?

    Based on the other forum posts, the way to do so seems to be some or all of these changes:

    conf/bootstrap_repositories.php
    Change

    “PATH” => “AJXP_DATA_PATH/files”,

    “PATH” => “AJXP_DATA_PATH/personal/AJXP_USER”,

    to

    “PATH” => “D:/Path_to/data/files”,

    “PATH” => “D:/Path_to/data/personal/AJXP_USER”,

    conf/bootstrap_conf.php
    Add

    define(“AJXP_DATA_PATH”, “D:/Path_to/data”);

    conf/bootstrap_context.php
    Change

    define(“AJXP_DATA_PATH”, AJXP_INSTALL_PATH.”/data”);

    define(“AJXP_SHARED_CACHE_DIR”, AJXP_INSTALL_PATH.”/data/cache”);

    to

    define(“AJXP_DATA_PATH”, “D:/Path_to/data”);

    define(“AJXP_SHARED_CACHE_DIR”, AJXP_DATA_PATH.”/cache”);

    —-

    In my instance I’ve tried all of the above methods and the bootstrap_context.php edit seems to work (ie: uploading files will show up in the correct new data folder), but I start getting this error when I open Pydio in the browser:

    fopen(D:/pydio/data\plugins\mq.sql/queues/channel-nodes:ajxp_conf): failed to open stream: Permission denied

    I’ve doublechecked that the IIS app pool has Read/Write/Execute permissions for all folders under the *new* D:/pydio/data folder. I’ve also refreshed plugin cache and restarted the IIS server. Am I missing something?

    Thank you


    • This topic was modified 1 year, 5 months ago by Profile photo of Charles Charles.
    #96320
    Profile photo of Patrick
    patrickc2
    Participant

    I’ve gotten the Data Directory moved without directly related errors, but now my public sharing links are broken.

    Here’s what I did to get tha data directory moved out of the site on IIS 7.5, Pydio 6.2.0
    Original structure: E:/pydio/data
    0) Stop IIS server

    1) Copy data folder to E:/data, delete data/cache/plugins_ files, grant permissions for IIS App Pool

    2) conf/bootstrap_conf.php
    Add
    define(“AJXP_DATA_PATH”, “E:/data/tmp”);

    3) conf/bootstrap_context.php
    Change
    define(“AJXP_DATA_PATH”, AJXP_INSTALL_PATH.”/data”);
    define(“AJXP_SHARED_CACHE_DIR”, AJXP_INSTALL_PATH.”/data/cache”);

    to

    define(“AJXP_DATA_PATH”, “E:/data”);
    define(“AJXP_SHARED_CACHE_DIR”, AJXP_DATA_PATH.”/cache”);

    4) core/tests/test.PHPCLI.php
    Change
    $tmpBat = implode(DIRECTORY_SEPARATOR, array(str_replace(“/”, DIRECTORY_SEPARATOR, AJXP_INSTALL_PATH), “data”,”tmp”, md5(time()).”.bat”));

    to

    $tmpBat = implode(DIRECTORY_SEPARATOR, array(str_replace(“/”, DIRECTORY_SEPARATOR, “E:/”), “data”,”tmp”, md5(time()).”.bat”));

    ————-

    Though I have the data directory moved, my public share link path seems to have been broken and I don’t know where to fix it.
    This is what a good link should look like: http://pydiosharesite.com//data/public/58c352
    This is what I’m getting now when I try to share a link: http://pydiosharesite.com/E:/data/public/58c352

    Does anyone have insight into how to fix the share links?

    Thank you


    #96321
    Profile photo of Patrick
    patrickc2
    Participant

    I solved the public link problem by going into the Settings
    Application Core > Pydio Main Options
    Set “Download URL” to “http://pydiosharesite.com//data/public”


    #96330
    Profile photo of Charles
    Charles
    Keymaster

    So you are all solved now?
    -c


    Charles, Pydio author - doing my best to help !
    If you like the software or want to say thanks, pay by a tweet, mention #pydio or follow us

    #96380
    Profile photo of Patrick
    patrickc2
    Participant

    Yes, this is solved. Thank you.


Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.