Aegir file system structure

Tagged:

This page documents the typical file system structure on an Aegir installation. It is intended to complement a related wiki page on Aegir Architecture. The following paths are based on an Aegir 0.4-x installation and assume that all directories are within the /var/aegir folder.

Scripts and Configuration Files

PathNotes
/backupssite-specific tar balls containing a database dump and folders under path/to/platform/sites/example.com
/config
/config/server_master
/config/server_master/apache
/config/server_master/apache/conf.dnon-aegir or non-drupal virtual hosts files
/config/server_master/apache/platform.dcontains .htaccess information for each aegir platform
/config/server_master/apache/vhost.dapache virtual host files for aegir platforms
/config/server_master/apache/vhost.d/aegir.example.comvirtual host file for aegir web site - specifies path to platform directory and site database settings (so that database credentials are not exposed directly in site settings.php file)
/config/server_master/apache/vhost.d/site-1.comvirtual host file for deployed web site
/config/server_master/apache/vhost.d/site-2.com
/config/server_master/apache/vhost.d/site-3.com
/drushdrush folder
/drush/drush.php drush script
/.drushdrush extensions and server, platform and site aliases
/.drush/drush_makedrush_make project folder - used for building web sites from .make files
/.drush/provisionprovision folder
/.drush/server_master.alias.drushrc.phpsettings for the master server where the main aegir database, hosting platform and aegir site reside
/.drush/platform_hostmaster.alias.drushrc.phpsettings for the hostmaster platform on which the aegir site is based
/.drush/hostmaster.alias.drushrc.phpsettings for the aegir site
/.drush/platform_platform1.alias.drushrc.phpsettings for platform1 on which site-1.com is based
/.drush/site-1.com.alias.drushrc.phpsettings for site-1.com

Hostmaster Platform and Aegir (front-end) Site

PathNotes
/hostmaster-0.xhostmaster platform
/hostmaster-0.x/profiles
/hostmaster-0.x/profiles/default
/hostmaster-0.x/profiles/hostmasterhostmaster profile
/hostmaster-0.x/profiles/hostmaster/modules
/hostmaster-0.x/profiles/hostmaster/modules/admin_menu
/hostmaster-0.x/profiles/hostmaster/modules/hostinghosting module
/hostmaster-0.x/profiles/hostmaster/modules/install_profile_apiinstall_profile_api – facilitates provisioning of sites based on a non-default profile
/hostmaster-0.x/profiles/hostmaster/modules/jquery_ui
/hostmaster-0.x/profiles/hostmaster/modules/modalframe
/hostmaster-0.x/profiles/hostmaster/themes
/hostmaster-0.x/profiles/hostmaster/themes/eldireldir theme – provides Aegir front end look and feel
/hostmaster-0.x/profiles/hostmaster/hostmaster.profileprofile file – used in site provisioning to configure a drupal database
/hostmaster-0.x/profiles/hostmaster/hostmaster.makemake file – used to include modules, themes, libraries etc. from various sources
/hostmaster-0.x/modules
/hostmaster-0.x/themes
/hostmaster-0.x/sites
/hostmaster-0.x/sites/aegir.example.comaegir web site folders

Deployed Platforms

Note: the directory /platforms is optional but can be useful to separate deployed platforms from directories for scripts, config files and hostmaster platform.

PathNotes
/platforms
/platforms/platform-1
/platforms/platform-1/profiles
/platforms/platform-1/profiles/default
/platforms/platform-1/profiles/custom-profile
/platforms/platform-1/profiles/custom-profile/modules
/platforms/platform-1/profiles/custom-profile/themes
/platforms/platform-1/profiles/custom-profile/custom.profileprofile file – used in site provisioning to configure a drupal database
/platforms/platform-1/profiles/custom-profile/custom.makemake file – used to include modules, themes, libraries etc. from various sources
/platforms/platform-1/modules
/platforms/platform-1/themes
/platforms/platform-1/sites
/platforms/platform-1/sites/site-1.com
/platforms/platform-1/sites/site-1.com/modules
/platforms/platform-1/sites/site-1.com/themes
/platforms/platform-1/sites/site-1.com/files
/platforms/platform-1/sites/site-1.com/settings.phpsite-specific drupal configuration file
/platforms/platform-1/sites/site-1.com/drushrc.php site-specific aegir-specific configuration file
/platforms/platform-1/sites/site-2.com
/platforms/platform-1/sites/site-3.com
/platforms/platform-1/sites/site-n.com
/platforms/platform-2
/platforms/platform-3
/platforms/platform-n


Platform permissions

PathDirectory              File                   Notes
./* aegir:aegir
drwxr-xr-x
aegir:aegir
-rw-r--r--
The webserver has no business writing or moving files in the Drupal codebase.
Inside ./sites/example.com:
drushrc.php aegir:www-data
-r--------
Web server shouldn't be able to read drushrc.php, it's not a component of the Drupal site.
settings.php aegir:www-data
-r--r-----
Web server can read this file, but otherwise tight control over this file which can contain sensitive information.
libraries
modules themes
aegir:aegir
drwxrsxr-x
aegir:aegir
-rw-r--r--
Because of the sticky bit (s) on the parent directory, each child directory will inherit attributes of the parent.
files
private
aegir:www-data
drwxrws---
Aegir sets these directories with a sticky bit (s) so that under certain conditions new folders and files will inherit parent permissions. There are only a few cases where this happens though.
files/*
private/*
www-data:www-data
drwxr-sr-x
www-data:www-data
-rw-r--r--
The permissions shown here are how files and directories created by www-data will look. When verifying a platform, Aegir won't "correct" these files and directories to match the parents. If you have trouble with permissions/ownership on these directories, you can safely run the following commands (in this case on the files directory):
# chown -R aegir:www-data /path/to/site/files/*
# chmod -R 775 /path/to/site/files/*

#1

Based on suggestions I've seen elsewhere, and the development workflow we need to follow (multiple developers using the same server, and I don't want them all to masquerade as aegir all the time just to get anything done)

I think that - seeing as the group is :aegir anyway, and the prevailing wisdom is to "join the aegir group" then we should have group write permissions on by default.

All cases of

drwxr-xr-x  aegir:aegir
-rw-r--r--  aegir:aegir

should be changed to

drwxrwxr-x  aegir:aegir
-rw-rw-r--  aegir:aegir

#2

The problem of setting up a non drupal vhost file is a very common issue that involves many later consequences. Just like you mentioned that you were not able to pick up in directory it also involves many similar issues.

#3

The problem of setting up a non drupal vhost file is a very common issue that involves many later consequences. Just like you mentioned that you were not able to pick up in directory it also involves many similar issues.