Posts by jeremiasz

    No, it's Dell R210.
    The root is mounted on hdd 160gb, formatted when installing omv.


    The sftp plugin works and user can log into the system but he's not chrooted and just logged directly in / and has access to / ofc.
    So it wasn't working for me and I've removed it from omv.


    Temporarly I'm using other omv box in the same rack but still need to fix the / permissions like gderf said.
    I"ll let You know if it works.

    But after "755 /" I need to set the proper permissions to other subfolders so I think it's not so simple like chmod 755 /.
    This box is still under construction so I haven't done any backup image of the system drive yet.


    Do You think that cause of a problem could stick in luks? I'm using omv plugin.

    Code
    cd /
    root@malyfin:/# ls -al
    total 108
    drwxrwxr-x 27 root root 4096 Dec 2 16:10 .
    drwxrwxr-x 27 root root 4096 Dec 2 16:10 ..

    this the / of file system if I understand You correctly.
    Or if You mean the / of the chrooted account (/srv/dev-disk-by-label-lustro/esftp/bik) as it is set the home dir of the bik user and here is output

    Code
    /srv/dev-disk-by-label-lustro/esftp/bik# ls -al
    total 12
    drwxr-xr-x 3 root root 4096 Dec 2 16:33 .
    drwxr-xr-x 3 root root 4096 Dec 2 15:12 ..

    ryecoaaron, I've tried it out secondly when editing sshd_config failed for me. Tried it but it wasn't working anyway so I've removed it.


    gderf, it is.



    Code
    drwxr-xr-x 8 root root 4096 Dec 2 15:11 dev-disk-by-label-lustro
    drwxr-xr-x 3 root root 4096 Dec 2 15:12 esftp

    Hi there,


    I've got a problem with chrooted SFTP. This is the fresh install of OMV (4.1.27-1).
    Auth.log says:

    Code
    Dec 2 16:26:30 malyfin sshd[31753]: Accepted password for bik from x.x.x.x port 7237 ssh2
    Dec 2 16:26:30 malyfin sshd[31753]: pam_unix(sshd:session): session opened for user bik by (uid=0)
    Dec 2 16:26:30 malyfin sshd[31753]: User child is on pid 31760
    Dec 2 16:26:30 malyfin sshd[31760]: fatal: bad ownership or modes for chroot directory component "/"
    Dec 2 16:26:30 malyfin sshd[31753]: pam_unix(sshd:session): session closed for user bik

    In the sshd_config I've add:


    Code
    Subsystem sftp internal-sftp
    Match User bik
    ChrootDirectory /srv/dev-disk-by-label-lustro/esftp/bik
    AllowTCPForwarding no
    X11Forwarding no
    ForceCommand internal-sftp

    The specified folder bik has a 755 permissions ofc.


    I've red all the threads about chrooting sftp and most of the problems was with permissions.
    Mine is different I think, sshd is trying to chroot this user to / instead to his home dir specyfied in sshd_config.


    Please advice 'cause I'm stuck and don't have any clue anymore.


    J