From 11dfd724a70f60777e98bb87e26f9a562f3d9801 Mon Sep 17 00:00:00 2001
From: skuli434 <skuli434@ispconfig3>
Date: Thu, 22 Dec 2011 09:17:16 -0500
Subject: [PATCH] myispconfig
---
server/plugins-available/shelluser_base_plugin.inc.php | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php
index 946aaaa..7677778 100755
--- a/server/plugins-available/shelluser_base_plugin.inc.php
+++ b/server/plugins-available/shelluser_base_plugin.inc.php
@@ -235,7 +235,7 @@
if (!file_exists($sshkeys)){
// add root's key
$app->file->mkdirs($sshdir, '0755');
- file_put_contents($sshkeys, file_get_contents('/root/.ssh/authorized_keys'));
+ if(is_file('/root/.ssh/authorized_keys')) file_put_contents($sshkeys, file_get_contents('/root/.ssh/authorized_keys'));
// Remove duplicate keys
$existing_keys = file($sshkeys);
@@ -273,7 +273,7 @@
$this->app->log("ssh-rsa key updated in ".$sshkeys,LOGLEVEL_DEBUG);
}
// 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'])." ".$usrdir);
exec("chmod 600 '$sshkeys'");
}
--
Gitblit v1.9.1