From dadfb45a9a29e239ff722e6d8e91c75f76c314b8 Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Fri, 05 Jun 2015 10:47:36 -0400
Subject: [PATCH] Merge branch 'master' of http://git.ispconfig.org/ispconfig/ispconfig3
---
server/plugins-available/shelluser_base_plugin.inc.php | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php
index a0ae9a5..d66428b 100755
--- a/server/plugins-available/shelluser_base_plugin.inc.php
+++ b/server/plugins-available/shelluser_base_plugin.inc.php
@@ -237,7 +237,7 @@
$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 {
@@ -407,6 +407,12 @@
}
$sshrsa = trim($sshrsa);
$usrdir = escapeshellcmd($this->data['new']['dir']);
+ //* Home directory of the new shell user
+ if($this->data['new']['chroot'] == 'jailkit') {
+ $usrdir = escapeshellcmd($this->data['new']['dir']);
+ } else {
+ $usrdir = escapeshellcmd($this->data['new']['dir'].'/home/'.$this->data['new']['username']);
+ }
$sshdir = $usrdir.'/.ssh';
$sshkeys= $usrdir.'/.ssh/authorized_keys';
--
Gitblit v1.9.1