SFTP plugin

  • I get an error when trying to add shares to SFTP.



    I have not the knowledge to understand the error.


    Also I first had an error saying "The user does not have read-only or read-write permission" i fixed that but the share is completely empty. So somehow the content of the share was deleted. I have a back up which i keep offline until al problems are fixed then i copy back and start making backups again.


    I am running OMV 6. Clean install. LVM to mirror 2 HDD's for data and 1 SSD for docker config.


    Something weird are the /dev/dm-0 ... /dev/dm-5 they come from LVM but in the filesystem section in OMV gui /dev/dm-2 is listed as "FSData" where in the shared folders /dev/dm-5 is listed as "FSData". So the filesystem is not referenced according to the gui.


    The LVM HDD's come from my raspberry to my new x86 device, so i just imported them.


    Hope some can help! If i need to give more info just ask!

    I do not like the weird things that are going on and I do not trust my NAS 100% at the moment.

    OMV 7

    Plugins - omvExtras | LVM2 | Compose plugin | SFTP | ...

    System - x86 intel - 2*4TB WD Red plus - 500GB WD Blue SSD

    Docker - Nextcloud | wg-easy | swag | vaultwarden | syncthing | gitea

    • Official Post

    Also I first had an error saying "The user does not have read-only or read-write permission" i fixed that but the share is completely empty.

    The sftp plugin requires that you give permissions (NOT ACLs) to the shared folder at the OMV level. This has nothing to do with the files on the filesystem.


    o somehow the content of the share was deleted.

    OMV will not delete files. The content must have been deleted (or changed permissions?) by some other action you performed.


    LVM to mirror 2 HDD's for data and 1 SSD for docker config.

    I would not use LVM for this. rsync is much better especially on an RPi (I know you moved away from it).

    I get an error when trying to add shares to SFTP.

    If you click on the bell in the top right of the web interface, you can copy and paste the error instead of the screenshot which does not contain all of the error message. I have a feeling it may be failing to bind mount to your LVM setup.

    omv 8.0.6-2 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.2 | compose 8.1.2 | cterm 8.0 | borgbackup 8.0.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • The sftp plugin requires that you give permissions (NOT ACLs) to the shared folder at the OMV level. This has nothing to do with the files on the filesystem.

    Does every user need these permissions or can I give the correct permissions to a group where they belong to?

    My experience is that i need to set it correct for every user, which is in my case not a big deal ( 4 users), but a little weird.


    OMV will not delete files. The content must have been deleted (or changed permissions?) by some other action you performed.

    Probably. As i said not a big problem since i have a back up.


    I would not use LVM for this. rsync is much better especially on an RPi (I know you moved away from it).

    Let rsync sync to a second drive every night or couple of hours then, instead of the mirror? (Just interested)


    If you click on the bell in the top right of the web interface, you can copy and paste the error instead of the screenshot which does not contain all of the error message.

    Good to know!



    I have a feeling it may be failing to bind mount to your LVM setup.

    How can i check this? And or is this a big issue?


    Thanks for helping! I know something but not everything.

    OMV 7

    Plugins - omvExtras | LVM2 | Compose plugin | SFTP | ...

    System - x86 intel - 2*4TB WD Red plus - 500GB WD Blue SSD

    Docker - Nextcloud | wg-easy | swag | vaultwarden | syncthing | gitea

    • Official Post

    Does every user need these permissions or can I give the correct permissions to a group where they belong to?

    My experience is that i need to set it correct for every user, which is in my case not a big deal ( 4 users), but a little weird.

    Because of how the plugin works (creates bind mounts for each user for each sharedfolder), giving the user permissions is required. And while groups would be easier, OMV (and the plugin) is not targeted at services requiring hundreds of users with very restricted access (bind mounts).


    Let rsync sync to a second drive every night or couple of hours then, instead of the mirror?

    Yep. The more often it runs, the less it probably needs to sync.

    How can i check this? And or is this a big issue?

    Compare the permissions you have given to the list of bind mounts in the output of mount

    omv 8.0.6-2 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.2 | compose 8.1.2 | cterm 8.0 | borgbackup 8.0.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Thanks for the info!


    Compare the permissions you have given to the list of bind mounts in the output of mount

    From the hole output of mount the only 3 interesting lines i have listed below. The permissions looks the same.

    Is it possible you need to disable the SFTP plugin before changing the shares? when disabled i didn't got any errors.

    Quote

    /dev/mapper/VG--Config-LV--Config on /srv/dev-disk-by-uuid-e8625cb4-3185-430d-89cb-e16d2aef13f3 type ext4 (rw,relatime,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group)

    /dev/mapper/VG--Data-LV--Data--Mirror on /srv/dev-disk-by-uuid-9b6fd61a-755b-416a-9e4b-89491e7da060 type ext4 (rw,relatime,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group)

    /dev/mapper/VG--Data-LV--Data--Mirror on /sftp/Laurien/Laurien type ext4 (rw,relatime,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group)

    OMV 7

    Plugins - omvExtras | LVM2 | Compose plugin | SFTP | ...

    System - x86 intel - 2*4TB WD Red plus - 500GB WD Blue SSD

    Docker - Nextcloud | wg-easy | swag | vaultwarden | syncthing | gitea

  • Something weird are the /dev/dm-0 ... /dev/dm-5 they come from LVM but in the filesystem section in OMV gui /dev/dm-2 is listed as "FSData" where in the shared folders /dev/dm-5 is listed as "FSData". So the filesystem is not referenced according to the gui.

    Is this a problem?

    OMV 7

    Plugins - omvExtras | LVM2 | Compose plugin | SFTP | ...

    System - x86 intel - 2*4TB WD Red plus - 500GB WD Blue SSD

    Docker - Nextcloud | wg-easy | swag | vaultwarden | syncthing | gitea

    • Official Post

    Is it possible you need to disable the SFTP plugin before changing the shares?

    If you disable the plugin, it does not create the shares. I'm not sure what change you are making.

    Is this a problem?

    Not sure. I don't have enough info. I see one bind mount in your output. It looks to be bind mounted to your mirror LV. Is the shared folder you are using the root of the filesystem?

    omv 8.0.6-2 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.2 | compose 8.1.2 | cterm 8.0 | borgbackup 8.0.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • If you disable the plugin, it does not create the shares. I'm not sure what change you are making.

    Just adding or deleting shares from the SFTP plugin.



    Is the shared folder you are using the root of the filesystem?

    Output of lsblk.


    The only 2 options to chose when making a shared folder.

    OMV 7

    Plugins - omvExtras | LVM2 | Compose plugin | SFTP | ...

    System - x86 intel - 2*4TB WD Red plus - 500GB WD Blue SSD

    Docker - Nextcloud | wg-easy | swag | vaultwarden | syncthing | gitea

    • Official Post

    I somehow missed that Lauren was in the mount point twice. So, it is not in the root of the filesystem.


    It would be helpful to see the whole error from the bell in the top right. And the output of: stat /

    omv 8.0.6-2 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.2 | compose 8.1.2 | cterm 8.0 | borgbackup 8.0.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Output

    Code
      File: /
      Size: 4096            Blocks: 8          IO Block: 4096   directory
    Device: b301h/45825d    Inode: 2           Links: 20
    Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
    Access: 2022-10-15 16:14:36.243565481 +0200
    Modify: 2022-10-02 21:41:22.891432763 +0200
    Change: 2022-10-02 21:41:22.891432763 +0200
     Birth: 2022-10-02 17:44:55.000000000 +0200

    OMV 7

    Plugins - omvExtras | LVM2 | Compose plugin | SFTP | ...

    System - x86 intel - 2*4TB WD Red plus - 500GB WD Blue SSD

    Docker - Nextcloud | wg-easy | swag | vaultwarden | syncthing | gitea

  • It would be helpful to see the whole error from the bell in the top right.

    I do not get any errors any more and i have the habit of clearing that section since the number stays next to the bell which i find distracting.

    But i will try not to clear the bell section from now on.

    OMV 7

    Plugins - omvExtras | LVM2 | Compose plugin | SFTP | ...

    System - x86 intel - 2*4TB WD Red plus - 500GB WD Blue SSD

    Docker - Nextcloud | wg-easy | swag | vaultwarden | syncthing | gitea

    • Official Post

    But i will try not to clear the bell section from now on.

    Clear it whenever you want. I just can't help more without that output.

    omv 8.0.6-2 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.2 | compose 8.1.2 | cterm 8.0 | borgbackup 8.0.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I tried recreating the error, but i didn't get it any more.

    Somehow happy its gone but on the other hand we do not know what caused it.


    About the other thing, is that a problem? It is not related to SFPT I think

    Something weird are the /dev/dm-0 ... /dev/dm-5 they come from LVM but in the filesystem section in OMV gui /dev/dm-2 is listed as "FSData" where in the shared folders /dev/dm-5 is listed as "FSData". So the filesystem is not referenced according to the gui.

    I also posted screenshots about it in post 8. Maybe i should have asked that in another thread.

    OMV 7

    Plugins - omvExtras | LVM2 | Compose plugin | SFTP | ...

    System - x86 intel - 2*4TB WD Red plus - 500GB WD Blue SSD

    Docker - Nextcloud | wg-easy | swag | vaultwarden | syncthing | gitea

    • Official Post

    Somehow happy its gone but on the other hand we do not know what caused it.

    Since I use this plugin a lot, I am quite sure it was something with the config you were trying to setup.

    About the other thing, is that a problem? It is not related to SFPT I think

    Seems like a visual problem. I would have to recreate it. This won't be high on my list of priorities though.

    omv 8.0.6-2 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.2 | compose 8.1.2 | cterm 8.0 | borgbackup 8.0.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Since I use this plugin a lot, I am quite sure it was something with the config you were trying to setup.

    Probably

    Seems like a visual problem

    I expected something like that but wanted to be sure.


    Thank you for helping!!

    OMV 7

    Plugins - omvExtras | LVM2 | Compose plugin | SFTP | ...

    System - x86 intel - 2*4TB WD Red plus - 500GB WD Blue SSD

    Docker - Nextcloud | wg-easy | swag | vaultwarden | syncthing | gitea

Participate now!

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