tbrehm
2011-11-15 c749e5226f585c700dd2a9572fbc7e7a1b62166b
server/plugins-available/shelluser_jailkit_plugin.inc.php
@@ -404,7 +404,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);
@@ -442,7 +442,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'");
      
   }