Commit 99e9ac79 authored by Till Brehm's avatar Till Brehm
Browse files

Fixed: FS#3906 - Wrong home folder permisions after changing ssh username.

parent 3fb9be68
......@@ -233,7 +233,7 @@ class shelluser_base_plugin {
$app->system->chgrp(escapeshellcmd($data['new']['dir'].'/home'),escapeshellcmd($data['new']['pgroup']));
}
$app->file->mkdirs(escapeshellcmd($homedir), '0750');
$app->system->chown(escapeshellcmd($homedir),escapeshellcmd($data['new']['username']));
$app->system->chown(escapeshellcmd($homedir),escapeshellcmd($data['new']['puser']));
$app->system->chgrp(escapeshellcmd($homedir),escapeshellcmd($data['new']['pgroup']));
$app->system->web_folder_protection($web['document_root'], true);
} else {
......@@ -406,7 +406,7 @@ class shelluser_base_plugin {
if($this->data['new']['chroot'] == 'jailkit') {
$usrdir = escapeshellcmd($this->data['new']['dir']);
} else {
$usrdir = escapeshellcmd($this->data['new']['dir'].'/home/'.$data['new']['username']);
$usrdir = escapeshellcmd($this->data['new']['dir'].'/home/'.$this->data['new']['username']);
}
$sshdir = $usrdir.'/.ssh';
$sshkeys= $usrdir.'/.ssh/authorized_keys';
......
Supports Markdown
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