forked from GNUsocial/gnu-social
set the permissions properly for installer
This commit is contained in:
parent
763229aede
commit
78a9d4966e
@ -212,7 +212,23 @@ class DomainStatusNetworkInstaller extends Installer
|
|||||||
|
|
||||||
foreach (array('AVATARBASE', 'BACKGROUNDBASE', 'FILEBASE') as $key) {
|
foreach (array('AVATARBASE', 'BACKGROUNDBASE', 'FILEBASE') as $key) {
|
||||||
$base = $config[$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 MAILTEMPLATE=/etc/statusnet/newsite-mail.txt
|
||||||
export MAILSUBJECT="Your new StatusNet site"
|
export MAILSUBJECT="Your new StatusNet site"
|
||||||
export POSTINSTALL=/etc/statusnet/morestuff.sh
|
export POSTINSTALL=/etc/statusnet/morestuff.sh
|
||||||
|
export WEBUSER=www-data
|
||||||
|
export WEBGROUP=www-data
|
||||||
|
Loading…
Reference in New Issue
Block a user