Commit 78a9d496 authored by Evan Prodromou's avatar Evan Prodromou

set the permissions properly for installer

parent 763229ae
......@@ -212,7 +212,23 @@ class DomainStatusNetworkInstaller extends Installer
foreach (array('AVATARBASE', 'BACKGROUNDBASE', 'FILEBASE') as $key) {
$base = $config[$key];
mkdir($base.'/'.$this->nickname, 0777, true);
$dirname = $base.'/'.$this->nickname;
// Make sure our bits are set
$mask = umask(0);
mkdir($dirname, 0770, true);
umask($mask);
// If you set the setuid bit on your base dirs this should be
// unnecessary, but just in case. You must be root for this
// to work.
if (array_key_exists('WEBUSER', $config)) {
chown($dirname, $config['WEBUSER']);
}
if (array_key_exists('WEBGROUP', $config)) {
chgrp($dirname, $config['WEBGROUP']);
}
}
}
......
......@@ -16,3 +16,5 @@ export WILDCARD=example.net
export MAILTEMPLATE=/etc/statusnet/newsite-mail.txt
export MAILSUBJECT="Your new StatusNet site"
export POSTINSTALL=/etc/statusnet/morestuff.sh
export WEBUSER=www-data
export WEBGROUP=www-data
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment