Install profile detached from site

Events happening in the community are now at Drupal community events on www.drupal.org.
ezeedub's picture

I'm trying to add a domain alias to my Aegir site (the one I installed when I first installed Aegir). When I edit the site node by adding my alias and saving, I get the error: "Please fill in a valid profile."

The profile appears to be correct though. Again, on the site node, profile is "hostmaster".

For some reason, I thought it might be some kind of permissions thing, so I did

sudo chown -R aegir:www-data /var/aegir/hostmaster-0.4-alpha7
sudo chmod -R g+w /var/aegir/hostmaster-0.4-alpha7

(I do that same process for sites folders from time to time when Drupal complains and it seems to work, but I'm a bit worried that it's too permissive. If anyone could shed light on why this is ok or not that woudl be great too.)

Anyway, changing permissions didn't solve anything in this case, so I dug into the hosting_site module to see where the error was occurring. It turns out that

if (!array_key_exists($node->profile, hosting_get_profiles($node->platform))) {

in hosting_site_validate() fails.

I had a look in hosting_get_profiles() and found that it was returning only one install profile for this platform (default), but couldn't figure out from there why that was the case. As I say, the site page for my Aegir site (the only one on my Aegir platform) shows "hostmaster" as the install profile. Can anyone point me in the right direction? Much appreciated!

Comments

I've had this problem too

timwood's picture

I've had this problem too, but didn't have time to look into it. I think I remember this being discussed here in some other thread. Maybe try searching for that error in the discussions for this site?

The aegir site node was not

mig5's picture

The aegir site node was not editable in alpha7. It was fixed in alpha8. I recommend you upgrade :)

Thanks!

ezeedub's picture

So, how do you upgrade? just kidding! :D

Worked like a charm

ezeedub's picture

And wow, what an easy upgrade process. You guys are amazing. Thanks again!

group permissions

hadsie's picture

Hey @skriv,

sudo chown -R aegir:www-data /var/aegir/hostmaster-0.4-alpha7
sudo chmod -R g+w /var/aegir/hostmaster-0.4-alpha7

(I do that same process for sites folders from time to time when Drupal complains and it seems to work, but I'm a bit worried that it's too permissive. If anyone could shed light on why this is ok or not that woudl be great too.)

I think I can explain why this is a bit of a security issue. www-data is the group the webserver is in. The chmod command you run there gives the webserver write access to the entire hostmaster drupal folder and all sub directories. You really only want to give the webserver write access to things it /absolutely needs/ write access to. In Drupal this is generally only a sites "files" directory.

If someone was able to execute arbitrary PHP code on your webserver they would be able to modify or delete any file in /var/aegir/hostmaster-0.4-alpha7.

Aegir hosting system

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: