From a3d243b238f2e3887771044501c9cab844106832 Mon Sep 17 00:00:00 2001 From: tbrehm Date: Mon, 2 Jan 2012 13:05:32 +0000 Subject: [PATCH] Fixed: FS#1945 - Authorized keys file not readable by shell user --- server/plugins-available/shelluser_base_plugin.inc.php | 1 + server/plugins-available/shelluser_jailkit_plugin.inc.php | 1 + 2 files changed, 2 insertions(+) diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php index 7677778eae..e482897fca 100755 --- a/server/plugins-available/shelluser_base_plugin.inc.php +++ b/server/plugins-available/shelluser_base_plugin.inc.php @@ -274,6 +274,7 @@ class shelluser_base_plugin { } // set proper file permissions // exec("chown -R ".escapeshellcmd($this->data['new']['puser']).":".escapeshellcmd($this->data['new']['pgroup'])." ".$usrdir); + exec("chown -R ".escapeshellcmd($this->data['new']['puser']).":".escapeshellcmd($this->data['new']['pgroup'])." ".$sshdir); exec("chmod 600 '$sshkeys'"); } diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php index 50d2b24b54..b5d6be4b2b 100755 --- a/server/plugins-available/shelluser_jailkit_plugin.inc.php +++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php @@ -443,6 +443,7 @@ class shelluser_jailkit_plugin { } // set proper file permissions // exec("chown -R ".escapeshellcmd($this->data['new']['puser']).":".escapeshellcmd($this->data['new']['pgroup'])." ".$usrdir); + exec("chown -R ".escapeshellcmd($this->data['new']['puser']).":".escapeshellcmd($this->data['new']['pgroup'])." ".$sshdir); exec("chmod 600 '$sshkeys'"); } -- GitLab