Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Aegir 0.4-Alpha2 installed on Ubuntu 8.04.3 via install script.
A positive response is given when saving changes at Site configuration --> File system
yet the fields revert back to the default values.
This is due to the following code in settings.php
global $conf;
$conf['file_directory_path'] = 'sites/example.com/files';
$conf['file_directory_temp'] = 'sites/example.com/files/tmp';
$conf['file_downloads'] = 1;
$conf['cache'] = 1;
$conf['clean_url'] = 1;
Comments
Comment #1
adrian CreditAttribution: adrian commentedthis is by design. otherwise the sites would walk all over their directories and it would be impossible to migrate them cleanly
Comment #2
j2parker CreditAttribution: j2parker commentedSo by design the private download method has been disabled.
Comment #3
adrian CreditAttribution: adrian commentedprivate download is a major performance drain, and that code is from the hostmaster code base.
you can comment out that line in the settings template file for now, and we can patch it to allow it to be set.
i've opened to issue again and changed it to be more specific to your needs.
Comment #4
obrienmd CreditAttribution: obrienmd commentedPerhaps it would be useful for Aegir to have an option at creation time of a 'site' for public/private file systems. I know private file systems are invaluable to many of our intranet sites, and it wouldn't be too hard for Aegir to have another directory, say '/var/aegir/privatefs/templatename/sitename', for this purpose. Thoughts?
Comment #5
nicksanta CreditAttribution: nicksanta commentedI have solved this problem similarly to @obrienmd, by overriding the $conf array using a settings.inc file.
I decided upon this directory structure: /var/aegir/private_files/sitename.com.au
The main difference between mine and #4 being that the platform isn't included in the path, mainly for less pain when migrating a site from one platform to another.
If anyone is wanting to do this at the moment, do the following:
In /var/aegir/config/includes/global.inc add this snippet
Create a settings.inc file in the sites directory alongside the settings.php file
Enjoy
Comment #6
j2parker CreditAttribution: j2parker commentedThe vhost.d config files contain "SetHandler This_is_a_Drupal_security_line_do_not_remove" for security reasons. This directive is relative to the files directory. How do you handle that?
Comment #7
nicksanta CreditAttribution: nicksanta commentedmm, that was something i overlooked.
I'm not an apache expert, so I'm not entirely sure if this will work - mainly because im not sure whether the subdirectories will inherit these rules or not.
In /etc/apache2/conf.d/nick_custom I've put this in:
If you agree that this will work, I'll edit #5 and add this in.
Comment #8
anarcat CreditAttribution: anarcat commentedI don't think we should hardcode the file method. As long as private downloads are secured by Aegir (which is something that should be checked before we stop enforcing this), we shouldn't enforce public downloads.
Comment #9
j2parker CreditAttribution: j2parker commentedExcept for the DB, files outside of sites/example.com are not included in the aegir backup task.
Comment #10
adrian CreditAttribution: adrian commentedBackups in aegir work because sites are considered 'atomic' .. ie everything needed to roll out the backup or install the site is in the same tarball, and can be moved between servers / etc.
So i have nothing much against private / public downloads .. but i have objections against having the files directory outside of the web tree, as it also complicates write permissions, and introduces situations where multiple sites can have access to the same files tree.
Comment #11
j0nathan CreditAttribution: j0nathan commentedsubscribing...
Comment #12
Th30philus CreditAttribution: Th30philus commentedThis is still a problem in 6.x-0.4-alpha6.
Comment #13
Bèrto ëd Sèra CreditAttribution: Bèrto ëd Sèra commentedsubscribing
Comment #14
adrian CreditAttribution: adrian commentedSo in the future you might not want this hardcoded, or in the web tree.
the example being multiple web server using a mounted files directory.
My main concern is that end users on the sites, change the paths.
Which gives them the ability to break things they aren't meant to be able to break.
This needs to still be enforced by aegir, but we should make what it enforces configurable (to the aegir admin).
Comment #15
stella CreditAttribution: stella commentedsubscribe
Comment #16
yajnin CreditAttribution: yajnin commentedsub
Comment #17
adrian CreditAttribution: adrian commentedComment #18
DanielJohnston CreditAttribution: DanielJohnston commentedSubscribing. It appears that site verify in the latest Aegir 0.4 alpha 8 regenerates the settings.php file and kills off any changes. Is this correct?
Incidentally, not sure if I'm missing a trick, but private downloads doesn't seem to need the files directory situated outside of the web tree in order to block unauthorised download requests with a 403 error message. This retains the atomic nature of Aegir's site handling.
Comment #19
Vidarls CreditAttribution: Vidarls commentedsubscribing
Comment #20
adrian CreditAttribution: adrian commentedI removed the line in head which overrides it
it's now up to the sites , or the admin if he wants to use global.inc to enforce a value.
Comment #21
obrienmd CreditAttribution: obrienmd commentedadrian - Just to confirm, you are saying sites can now set file storage setting in UI, and change will persist, through clones/migrations/etc?
Comment #22
adrian CreditAttribution: adrian commentedobrienmd - no, ONLY the private/public download bit.
setting the file path is still something that can break things really horribly.
Comment #23
adrian CreditAttribution: adrian commentedmarking as fixed.
if you want to shoot yourself in the foot you can use the new 'local.settings.php' in the site directory to override the file dir.
Comment #24
adrian CreditAttribution: adrian commented