Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explanation for moving archive folder outside document root necessary #12

Open
leonie12 opened this issue Jan 15, 2017 · 3 comments
Open
Labels

Comments

@leonie12
Copy link

I am fiddling around with trying to move the backup directory outside document root.
Whichever paths I enter in settings.php and modules configuration tab i don#t get it to work.

Maybe you could give some examples of which entries are to make where? Where is it necessary to place full/absolute path, and where relative to server document root?

In my case I would like to place _evobackup_archives inside "priv" folder two levels above document root. Is this possible? Which paths would be to enter at which places?

@Nicola1971
Copy link
Owner

i don't know if can work out the document root. never tested and is not a supported feature for now.

Try:

  1. modify the path on settings .php, (remove document root and add an hardcoded path to your dir)
  2. before add modx_backup_dir settings in module configuration you need to change this line where is defined the document root inside the $modx_backup_dir

https://github.com/Nicola1971/EvoBackup/blob/master/install/assets/modules/EvoBackup.tpl#L53

Never tested so I do not know if it is sufficient

@leonie12
Copy link
Author

After changing paths in settings.php., evobackup.php, the module configuration and the settings tab in the manager the backup archive was created in the chosen folder above document root.
The only backstep is that it is now not any more possible to download the archive via the download button.
Then you get an error that it can't find the file. I assume it is because it is not reachable for the server (because it is above doument root)?
If I interpret correctly this is the desired behaviour regarding security? Now you can download the backup archive only via ftp.
Are there better solutions in regard to security? Access-denying htaccess in backup archive folder?

@Nicola1971
Copy link
Owner

Nicola1971 commented Jan 15, 2017

made a little test. TESTED ONLY ON LOCALHOST
further previous modifications

  • open download.php

replace line 3 include_once(dirname(__FILE__).'/settings.php');

with the hardcoded path you added in settings.php . ie:

$modx_backup_dir = '/home/domainname/domains/domainname.com/private_html/_evobackup_archives/'

your downloads should works :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants