From 3fb9be68159f94f4fe9f6fac579b31b5533b6dc7 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Wed, 03 Jun 2015 12:44:01 -0400
Subject: [PATCH] Fix for FS#3857 .ssh key directory problem.
---
server/plugins-available/shelluser_base_plugin.inc.php | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php
index ca69b5f..35f790e 100755
--- a/server/plugins-available/shelluser_base_plugin.inc.php
+++ b/server/plugins-available/shelluser_base_plugin.inc.php
@@ -402,6 +402,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/'.$data['new']['username']);
+ }
$sshdir = $usrdir.'/.ssh';
$sshkeys= $usrdir.'/.ssh/authorized_keys';
--
Gitblit v1.9.1