SFTP Plugin Problem

  • The other thing that comes up once in a while is incorrect permissions on /

    It seems you right !

    Why that comes up once in a while ? Like it's a magic thing !

    --

    Openmediavault : 5.5.6-1 (Usul) Linux kernel : 5.4.0-0.bpo.4-amd64

  • I have no idea why this happens. But this is the clue in the auth log:


    Jul 12 16:48:50 server sshd[14492]: fatal: bad ownership or modes for chroot directory component "/"

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

  • Thanks !

    And how should I correct this ?


    I'm little bit scarry of running chmod 755 / because I'm not sure it's a clean solution and I don't have the courage of making a system backup before, for the moment :)

    --

    Openmediavault : 5.5.6-1 (Usul) Linux kernel : 5.4.0-0.bpo.4-amd64

  • That is the correct and only solution.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

  • From the execution of chmod 755 /, I can log in and see my sharedfolder directory but I can't see its content, the sharedfolder appears empty.

    Any idea ?

    --

    Openmediavault : 5.5.6-1 (Usul) Linux kernel : 5.4.0-0.bpo.4-amd64

  • I've tried this :

    OMV_SHAREDFOLDERS_DIR_ENABLED="YES" setting to /etc/default/openmediavault and then run:

    omv-salt stage run prepare

    omv-salt deploy run systemd

    reboot

    But didn't solve.


    Should I understand that SFTP plugin definitively won't work/allow us to access local shared files from internet ?

    What's the best way to do this with openmediavault ?

    --

    Openmediavault : 5.5.6-1 (Usul) Linux kernel : 5.4.0-0.bpo.4-amd64

    Edited 3 times, last by bzhprogramming ().

  • If you want to use the /sharedfolder/ feature, you need to set OMV-SHAREDFOLDERS_DIR_ENABLED="YES".

    However, this only changed, if you find bind mounts to the shared folders in /sharedfolders/.

    In any case you will find the shared folders with their absolute path /srv/dev-disk-by-label.....

  • Sorry I made a mistake, I had set 'YES'. I corrected my post.

    But this didn't solve my problem.

    --

    Openmediavault : 5.5.6-1 (Usul) Linux kernel : 5.4.0-0.bpo.4-amd64

  • Should I understand that SFTP plugin definitively won't work/allow us to access local shared files from internet ?

    Of course it will and I use it for that. I would try uninstalling the plugin and install again and make sure the user has permissions to the content. Also, the sharedfolder dir does not need to be enabled and I actually wouldn't enable it.

    omv 5.6.0 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.5.3
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • I have the same problem on a fresh install of openmediavault.



    user duplibackup is added to the group sftp-access.


    with "Allow access to sftp-access group only" turned off, I can login as another user and this user has full acces to / but duplibackup cannot login.


    with "Allow access to sftp-access group only" turned on, I get the following filezilla output:


    Code
    Antwoord: fzSftp started, protocol_version=9
    Opdracht: open "duplibackup@192.168.179.175" 222
    Status: Using username "duplibackup".
    Opdracht: Pass: **************
    Fout: FATAL ERROR: Network error: Software caused connection abort
    Fout: Kan niet verbinden met server

    in auth.log

    Code
    Nov 26 18:15:08 omvwilnis sshd[1812]: Accepted password for duplibackup from 192.168.179.131 port 56064 ssh2
    Nov 26 18:15:08 omvwilnis sshd[1812]: pam_unix(sshd:session): session opened for user duplibackup by (uid=0)
    Nov 26 18:15:09 omvwilnis sshd[1821]: fatal: bad ownership or modes for chroot directory component "/"
    Nov 26 18:15:09 omvwilnis sshd[1812]: pam_unix(sshd:session): session closed for user duplibackup


    I did not do any chmod's but these seem to be ok.



    I have several plugins installed:

    openmediavault-backup 5.2.1

    openmediavault-downloader 5.1

    openmediavault-flashmemory 5.0.7

    openmediavault-fail2ban 5.0.5

    openmediavault-sftp 5.0.6

    openmediavault-omvextrasorg 5.4.2


    I am using OMV-version 5.5.17-3 (Usul).


    The only commandline changes that I did was the installscript of omv-extras and the changes from openmediavault-flashmemory.


    So I am pretty sure there is still a bug in the sftp plugin.


    ryecoaaron Can you please give me some instructions that will help find the bug.



  • This is your problem:


    Nov 26 18:15:09 omvwilnis sshd[1821]: fatal: bad ownership or modes for chroot directory component "/"


    Fix it like this in a root shell:


    chmod 755 /

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

  • So I am pretty sure there is still a bug in the sftp plugin.


    ryecoaaron Can you please give me some instructions that will help find the bug.

    Many, many people (including myself) use this plugin and don't have a problem. This is not a bug. 99.9% of the time, it is permissions. what is the output of: stat /

    omv 5.6.0 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.5.3
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • output of stat /

    Code
    Bestand: /
    Grootte: 4096 Blokken: 8 IO-blok: 4096 map
    Apparaat: 821h/2081d Inode: 2 Koppelingen: 21
    Toegang: (0775/drwxrwxr-x) UID: ( 0/ root) GID: ( 0/ root)
    Toegang: 2020-11-23 00:28:44.249652593 +0100
    Gewijzigd: 2020-11-26 15:45:36.834695509 +0100
    Veranderd: 2020-11-26 15:45:36.834695509 +0100
    Ontstaan: -

    So this should probably indicate that a chmod 755 / would solve the problem, but how did this permission get wrong?

  • how did this permission get wrong?

    Some installers set it incorrectly. My install script actually fixes it but I think there were a few ISOs that set it wrong.

    omv 5.6.0 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.5.3
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Ah that's interesting, I installed from openmediavault 5.3.9-amd64 as I still had a burned CD with that iso.

    After install I just updated with "update management"

    I did not use the latest iso. Good lesson for me to remember: "always use the latest updates."


    After chmod 755 / it works now.


    Many thanks for the very quick help to ryecoaaron and gderf .

  • I Had the same issue.

    "connection abort" whith the "Allow Groups" off

    and "Auth failed" whith the "Allow Groups" on


    I installed with the 5.5.11 iso

    have the version 5.5.21-1


    Code
    chmod 755 /

    In a terminal resolved the issue.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!