View Single Post
  #1  
Old 1st December 2011, 15:36
redwiz redwiz is offline
Junior Member
 
Join Date: Dec 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default bad permission creating shell user with rsa key

I don't know if this is the right forum to post, but i think i discovered a bug in shelluser creation procedure.

I downloaded and installed ispconfig last version (no sources modification made).

if i try to create a shell user ,both with o without chroot, and also provide a public rsa key evereything works fine, the user is created, and also ~/.ssh and ~/.ssh/authorized_keys are.

The problem is that ~/.ssh and ~/.ssh/authorized_keys are created owned by root , so i had to change manually the permission to let ssh work for that user.

Taking a look inside the sources i realized that in both

shelluser_jailkit_plugin.inc.php
and
shelluser_base_plugin.inc.php

the line that is suposed to give the right owner
(at the very end of the files)

exec("chown -R ".escapeshellcmd($this->data['new']['puser']).":".escapeshellcmd($this->data['new']['pgroup'])." ".$usrdir);


is commented out.

Am i right or i miss something?

thanks in advance to every answer

Andrea Consigli
Reply With Quote
Sponsored Links