Errors while installing sftp plugin

    • OMV 3.x
    • Resolved

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Errors while installing sftp plugin

      Hi there,

      I SSH into OMV, however, would like to enable access to a select few users. I have FTPS working, but am looking for something more secure which may be accessed via an FTP application. I installed the sftp plugin but received errors on install and uninstall:

      Install:

      Source Code

      1. Reading package lists...
      2. Building dependency tree...
      3. Reading state information...
      4. The following NEW packages will be installed:
      5. openmediavault-sftp
      6. 0 upgraded, 1 newly installed, 0 to remove and 33 not upgraded.
      7. Need to get 10.5 kB of archives.
      8. After this operation, 38.9 kB of additional disk space will be used.
      9. Get:1 https://dl.bintray.com/openmediavault-plugin-developers/erasmus-testing/ jessie/main openmediavault-sftp all 3.0.2 [10.5 kB]
      10. Fetched 10.5 kB in 0s (27.8 kB/s)
      11. Selecting previously unselected package openmediavault-sftp.
      12. (Reading database ... (Reading database ... 5%(Reading database ... 10%(Reading database ... 15%(Reading database ... 20%(Reading database ... 25%(Reading database ... 30%(Reading database ... 35%(Reading database ... 40%(Reading database ... 45%(Reading database ... 50%(Reading database ... 55%(Reading database ... 60%(Reading database ... 65%(Reading database ... 70%(Reading database ... 75%(Reading database ... 80%(Reading database ... 85%(Reading database ... 90%(Reading database ... 95%(Reading database ... 100%(Reading database ... 76285 files and directories currently installed.)
      13. Preparing to unpack .../openmediavault-sftp_3.0.2_all.deb ...
      14. Unpacking openmediavault-sftp (3.0.2) ...
      15. Processing triggers for openmediavault (3.0.59) ...
      16. Restarting engine daemon ...
      17. Setting up openmediavault-sftp (3.0.2) ...
      18. enabled
      19. ERROR: The script '/usr/share/openmediavault/mkconf/netrc' does not exist
      20. fuse: mountpoint is not empty
      21. fuse: if you are sure this is safe, use the 'nonempty' mount option
      22. dpkg: error processing package openmediavault-sftp (--configure):
      23. subprocess installed post-installation script returned error exit status 32
      24. Processing triggers for openmediavault (3.0.59) ...
      25. Restarting engine daemon ...
      26. Errors were encountered while processing:
      27. openmediavault-sftp
      28. >>> *************** Error ***************
      29. <<< *************************************
      30. >>> *************** Error ***************
      31. <<< *************************************
      32. >>> *************** Error ***************
      33. <<< *************************************
      34. >>> *************** Error ***************
      35. <<< *************************************
      36. >>> *************** Error ***************
      37. <<< *************************************
      38. >>> *************** Error ***************
      Display All


      Uninstall:


      Source Code

      1. Error #0:
      2. exception 'OMV\Rpc\Exception' with message 'Failed to read from socket: Connection reset by peer' in /usr/share/php/openmediavault/rpc/rpc.inc:169
      3. Stack trace:
      4. #0 /usr/share/php/openmediavault/rpc/proxy/json.inc(95): OMV\Rpc\Rpc::call('Exec', 'getOutput', Array, Array, 3)
      5. #1 /var/www/openmediavault/rpc.php(45): OMV\Rpc\Proxy\Json->handle()
      6. #2 {main}

      Thoughts would be appreciated!

      Thank you
      NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm
    • RS1 wrote:

      but am looking for something more secure which may be accessed via an FTP application
      ftp applications can't access sftp. You need an ssh application like WinSCP.

      You have something wrong with one of your mounts on the remotemount plugin causing the issues.
      omv 4.0.5 arrakis | 64 bit | 4.12 backports kernel | omvextrasorg 4.0.4
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • gderf wrote:

      Filezilla is one that does sftp, ftp, ftps, and then some.
      Haven't used filezilla in years but that means it is more than just an ftp app now. Was just trying to say that ftp/ftps are very different than sftp and most ftp apps won't work with sftp.
      omv 4.0.5 arrakis | 64 bit | 4.12 backports kernel | omvextrasorg 4.0.4
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      RS1 wrote:

      but am looking for something more secure which may be accessed via an FTP application
      ftp applications can't access sftp. You need an ssh application like WinSCP.
      You have something wrong with one of your mounts on the remotemount plugin causing the issues.
      Thanks for this. I didn't have anything mounted in the remoteplugin tab. Tried to install/uninstall again but received the same error.

      As a result, I tried to uninstall the remotemount plugin, however, received the same error as I did when uninstalling the sftp plugin.

      Thoughts?
      NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm
    • Here's the output.. (I previously uninstalled the two of them but with errors per the above);

      Source Code

      1. root@NAS:/# apt-get purge openmediavault-sftp openmediavault-remotemount
      2. Reading package lists... Done
      3. Building dependency tree
      4. Reading state information... Done
      5. Package 'openmediavault-remotemount' is not installed, so not removed
      6. Package 'openmediavault-sftp' is not installed, so not removed
      7. 0 upgraded, 0 newly installed, 0 to remove and 71 not upgraded.
      8. root@NAS:/#
      Just tried to re-install remote mount but received a 'need a 3.0.60' error.

      Similarly, tried to re-install sftp - but received a 'socket reset by peer' error and several 'error' lines per the posts earlier
      NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm
    • RS1 wrote:

      Just tried to re-install remote mount but received a 'need a 3.0.60' error.
      Piping in with a Me-Too. Went to update the remotemount plugin as part of a normal update process, and got an error saying that version 3.0.2 (which, the release notes say is updated for OMV 3.0.52) requires 3.0.60. I've got plugin version 3.0.1 installed and still working on OMV 3.0.59; not sure if that's a bug or a feature.
    • wolffstarr wrote:

      Piping in with a Me-Too. Went to update the remotemount plugin as part of a normal update process, and got an error saying that version 3.0.2 (which, the release notes say is updated for OMV 3.0.52) requires 3.0.60. I've got plugin version 3.0.1 installed and still working on OMV 3.0.59; not sure if that's a bug or a feature.
      I removed 3.0.3 from the repo since it required 3.0.60. 3.0.2 requires 3.0.52. Everything should be fine now. If you are still seeing that version, it is downloaded locally and apt clean should fix it.
      omv 4.0.5 arrakis | 64 bit | 4.12 backports kernel | omvextrasorg 4.0.4
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      wolffstarr wrote:

      Piping in with a Me-Too. Went to update the remotemount plugin as part of a normal update process, and got an error saying that version 3.0.2 (which, the release notes say is updated for OMV 3.0.52) requires 3.0.60. I've got plugin version 3.0.1 installed and still working on OMV 3.0.59; not sure if that's a bug or a feature.
      I removed 3.0.3 from the repo since it required 3.0.60. 3.0.2 requires 3.0.52. Everything should be fine now. If you are still seeing that version, it is downloaded locally and apt clean should fix it.

      Probably it should, but it's still trying to install 3.0.3 even after the apt clean. If there's no serious issues with using 3.0.2 on OMV 3.0.59, I'll just wait until 3.0.60 comes out.
    • wolffstarr wrote:

      Probably it should, but it's still trying to install 3.0.3 even after the apt clean.
      Must have started the install. Probably have to do an apt-get -f install

      wolffstarr wrote:

      If there's no serious issues with using 3.0.2 on OMV 3.0.59, I'll just wait until 3.0.60 comes out.
      I don't think there is. The change in 3.0.3 is due to a change in 3.0.60.
      omv 4.0.5 arrakis | 64 bit | 4.12 backports kernel | omvextrasorg 4.0.4
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      wolffstarr wrote:

      Piping in with a Me-Too. Went to update the remotemount plugin as part of a normal update process, and got an error saying that version 3.0.2 (which, the release notes say is updated for OMV 3.0.52) requires 3.0.60. I've got plugin version 3.0.1 installed and still working on OMV 3.0.59; not sure if that's a bug or a feature.
      I removed 3.0.3 from the repo since it required 3.0.60. 3.0.2 requires 3.0.52. Everything should be fine now. If you are still seeing that version, it is downloaded locally and apt clean should fix it.
      Thanks for taking a look at this. Didn't work for me either though. As wolffstarr mentioned, I don't mind waiting till 3.0.60!

      However, any thoughts on the sftp plugin issue that I mentioned? Note: I disabled the SSH plugin which uses port 22. Then reinstalled the sftp plugin. The plugin installed fine after disabling SSH - this is odd as the sftp plugin operates on port 222 opposed to 22 by default. But it's great news that I could get this installed without an error! However, when I try to add an access list or enable the plugin, I receive the following error:

      Source Code

      1. Error #0:
      2. exception 'OMV\ExecException' with message 'Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; omv-mkconf sftp 2>&1' with exit code '32': fuse: mountpoint is not empty
      3. fuse: if you are sure this is safe, use the 'nonempty' mount option' in /usr/share/php/openmediavault/system/process.inc:175
      4. Stack trace:
      5. #0 /usr/share/openmediavault/engined/module/sftp.inc(66): OMV\System\Process->execute()
      6. #1 /usr/share/openmediavault/engined/rpc/config.inc(163): OMVModuleSftp->applyConfig()
      7. #2 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      8. #3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)
      9. #4 /usr/share/php/openmediavault/rpc/serviceabstract.inc(150): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)
      10. #5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(528): OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatuseu...', '/tmp/bgoutputZY...')
      11. #6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(151): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
      12. #7 /usr/share/openmediavault/engined/rpc/config.inc(208): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)
      13. #8 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      14. #9 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)
      15. #10 /usr/share/php/openmediavault/rpc/rpc.inc(84): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)
      16. #11 /usr/sbin/omv-engined(516): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)
      17. #12 {main}
      Display All
      Getting closer.. Any thoughts? Thanks!
      NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm
    • RS1 wrote:

      However, any thoughts on the sftp plugin issue that I mentioned?
      Remove the /sftp directory after uninstalling the plugin. Then reinstall the plugin.
      omv 4.0.5 arrakis | 64 bit | 4.12 backports kernel | omvextrasorg 4.0.4
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      Remove the /sftp directory after uninstalling the plugin. Then reinstall the plugin

      I added a share with several media files to the access list. Due to the error messages, I haven't been able to apply the share/remove the share/enable the plugin. So I proceeded to uninstall the plugin and was about to delete the /sftp directory, only to find that it isn't empty: <user>/<share>.

      Is the /sftp a symbolic link to the share which is stored on another data drive?
      If I delete the /sftp folder, will the data on my share get deleted with it?

      Thanks!
      NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm
    • RS1 wrote:

      Is the /sftp a symbolic link to the share which is stored on another data drive?
      No. It is a real directory but the sub-directories are bind-mounted to the shared folder. Unmount the bind mounts and you should be able to remove /sftp.
      omv 4.0.5 arrakis | 64 bit | 4.12 backports kernel | omvextrasorg 4.0.4
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      No. It is a real directory but the sub-directories are bind-mounted to the shared folder. Unmount the bind mounts and you should be able to remove /sftp.


      I'm not sure bout how I may unmount the bind mounts. I would usually use the plugin, but that isn't working for me. Is there another way?
      NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm

      The post was edited 3 times, last by RS1 ().

    • RS1 wrote:

      ryecoaaron wrote:

      No. It is a real directory but the sub-directories are bind-mounted to the shared folder. Unmount the bind mounts and you should be able to remove /sftp.
      I'm not sure bout how I may unmount the bind mounts. I would usually use the plugin, but that isn't working for me. Is there another way?



      I figured it out from here: [GUIDE] SFTP Selective remote folder access to certain users ; managed to unmount the bind. Will try to get sftp working in the next few days. Thanks again for the help.

      It is worth saying that there is outstanding support in this forum! :thumbsup:
      NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm
    • Right - I'm trying SFTP today (brand new Erasmus build from ISO, omv-update shows all clean, as does apt-get -f install)

      I'm enabled the SFTP plugin and set my options, but when I try to create an access list, to a defined share with a defined user, I get this when I try to Apply the settings:

      Source Code

      1. Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; omv-mkconf sftp 2>&1' with exit code '1': grep: /root/.netrc: No such file or directory run-parts: /usr/share/openmediavault/mkconf/fstab.d/91-sftp exited with return code 1
      The full trace is:

      Source Code

      1. Error #0:
      2. exception 'OMV\ExecException' with message 'Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; omv-mkconf sftp 2>&1' with exit code '1': grep: /root/.netrc: No such file or directory
      3. run-parts: /usr/share/openmediavault/mkconf/fstab.d/91-sftp exited with return code 1' in /usr/share/php/openmediavault/system/process.inc:175
      4. Stack trace:
      5. #0 /usr/share/openmediavault/engined/module/sftp.inc(66): OMV\System\Process->execute()
      6. #1 /usr/share/openmediavault/engined/rpc/config.inc(168): OMVModuleSftp->applyConfig()
      7. #2 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      8. #3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)
      9. #4 /usr/share/php/openmediavault/rpc/serviceabstract.inc(150): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)
      10. #5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(528): OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatus8f...', '/tmp/bgoutputoW...')
      11. #6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(151): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
      12. #7 /usr/share/openmediavault/engined/rpc/config.inc(213): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)
      13. #8 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      14. #9 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)
      15. #10 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)
      16. #11 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)
      17. #12 {main}
      Display All
      Any clues? What is needed to generate .netrc?


      Cheers!
    • Users Online 1

      1 Guest