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.
We are recommending that people create their platforms in ~aegir/platforms, but that path isn't created by the aegir installer. This should be done to improve usability and help people use best practices from the start.
Comment | File | Size | Author |
---|---|---|---|
#3 | provision-956432-auto-create-platforms-3.diff | 1.08 KB | skwashd |
#1 | provision-956432-auto-create-platforms.diff | 1.07 KB | skwashd |
Comments
Comment #1
skwashd CreditAttribution: skwashd commentedThe attached patch is untested, which is why the issue is marked as needs work. I am dropping it here so it doesn't get lost. I came out of a discussion with anarcat and mig5 on IRC - mig5 doesn't like it.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedBias aside,
At a quick glance, wouldn't this patch create the 'platforms' directory in /var/aegir/config/server_master/apache/ ?
It's operating in the context of the http service. It probably needs to be outside of here.
It should probably be somewhere like the 'server' conditional in
drush_provision_drupal_pre_provision_verify()
located in provision/platform/verify.provision.inc.Comment #3
skwashd CreditAttribution: skwashd commentedRerolled to fix the path problem found by mig5. Still untested. There is too much uncertainty on IRC for me to do any more on this for now.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedThanks for your work on this and putting up with us in IRC,
So basically where we stand is anarcat and I are not sure whether the creating of dirs should be handled in the http class like the patch does, or (as I thought), in the '$type == server' conditional of
drush_provision_drupal_pre_provision_verify
in platform/verify.provision.inc.We seem to create dirs in both places and I don't know why / what the significance of the difference is.
I think in either case, the stuff is synced to remote servers if necessary.
Comment #5
skwashd CreditAttribution: skwashd commentedI was trying to explain on IRC, the platform files are used by the http server (apache, nginx etc) and so I think the directory should be managed by the http class, not some generic aegir server verification function. This is why I have put the code where I did.
Comment #6
j2parker CreditAttribution: j2parker commentedThe following excerpt is taken from INSTALL.txt:
"This document assumes the Aegir user is ``aegir``, its home directory is
``/var/aegir`` and the webserver group is ``www-data``. You can choose another
username if desired."
Those are assumptions which are not always correct. Hardcoding the platform path will add another assumption which too will not always be correct.
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedbut it is the job of the verify function to ensure such directories exist if it expects them too.
So even if it's in http.drush.inc, it should probably be in the verify_server_cmd().
And it should then sync but exclude the contents (probably), same as the other syncs in that function do.
Still waiting for Vertice expertise here
Comment #8
skwashd CreditAttribution: skwashd commentedAll common desktop environments these days provide a "documents" folder of some form. It is an assumption that you will store your documents in there, but nothing forces you to do that. The same is true with the platforms path, it is advocated as best practice, but you don't have to use it.
It is a similar story for the /var/aegir path. You are free to use whatever path you want for installing Aegir, the script encourages you to do it in a common path, which in theory should make it easier to provide support.
Comment #9
anarcat CreditAttribution: anarcat commentedThis should have been marked as needs review, as the code seems ready.
Anybody strongly opposes this? We're just providing a useful default here, not starting a revolution. ;)
Comment #10
omega8cc CreditAttribution: omega8cc commentedI vote +1 since it is another way to promote good practices. People tend to put platforms directly in the /var/aegir and it quickly becomes horrible mess, so introducing separate subdirectory by default is a good idea.
Comment #11
omega8cc CreditAttribution: omega8cc commentedRe: #3 - It works as expected, but the chmod needs to be changed to 0755.
Comment #12
anarcat CreditAttribution: anarcat commentedalright, patch committed.
Comment #13
skwashd CreditAttribution: skwashd commentedA bit late now, but the permission should have been 0750 as it should only be available to aegir:www-data, not world readable.
Comment #14
omega8cc CreditAttribution: omega8cc commentedI think it is correct (0755) to allow access when user (ssh/ftps) is a member of Aegir group but is not a member of www-data group?
Comment #15
anarcat CreditAttribution: anarcat commentedI agree: tools, not policy... in fact, i believe we should just not change the mode of that directory...