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.

    • Addendum - I created a /root/.netrc with touch (just to see if it would do anything) and then got this:

      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': run-parts: /usr/share/openmediavault/mkconf/fstab.d/91-sftp exited with return code 1' in /usr/share/php/openmediavault/system/process.inc:175
      3. Stack trace:
      4. #0 /usr/share/openmediavault/engined/module/sftp.inc(66): OMV\System\Process->execute()
      5. #1 /usr/share/openmediavault/engined/rpc/config.inc(168): OMVModuleSftp->applyConfig()
      6. #2 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      7. #3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)
      8. #4 /usr/share/php/openmediavault/rpc/serviceabstract.inc(150): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)
      9. #5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(528): OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatus7Q...', '/tmp/bgoutputda...')
      10. #6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(151): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
      11. #7 /usr/share/openmediavault/engined/rpc/config.inc(213): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)
      12. #8 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      13. #9 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)
      14. #10 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)
      15. #11 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)
      16. #12 {main}
      Display All
    • ptruman wrote:

      Any clues? What is needed to generate .netrc?
      Is one of the shares a remote mount share? The sftp plugin doesn't need .netrc. What is the output of: dpkg -l | grep -E "openm|omv"
      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!
    • Here you go (output below).
      Remoteshare (plugin) is installed but no shares are remote - they are all on a local RAID.

      Source Code

      1. ii omvextras-netrc 3.0.2 all Write .netrc from multiple plugins
      2. ii openmediavault 3.0.88 all Open network attached storage solution
      3. ii openmediavault-clamav 3.3.3 all OpenMediaVault ClamAV plugin
      4. ii openmediavault-dnsmasq 3.1.5 all OpenMediaVault dnsmasq (local DNS and DHCP server) plugin
      5. ii openmediavault-keyring 1.0 all GnuPG archive keys of the OpenMediaVault archive
      6. ii openmediavault-letsencrypt 3.2 all Generate free and valid SSL certificates for OMV
      7. ii openmediavault-minidlna 3.3.10 all OpenMediaVault miniDLNA (DLNA server) plugin
      8. ii openmediavault-nut 3.2.12 all OpenMediaVault Network UPS Tools (NUT) plugin
      9. ii openmediavault-omvextrasorg 3.4.26 all OMV-Extras.org Package Repositories for OpenMediaVault
      10. ii openmediavault-openvpnas 3.3 all OpenVPN Acess Server plugin for OpenMediaVault.
      11. ii openmediavault-remotemount 3.0.10 all Remote mount plugin for OpenMediaVault.
      12. ii openmediavault-sftp 3.1 all sftp server
      13. ii openmediavault-wol 3.2 all OpenMediaVault WOL plugin
      Display All
    • ptruman wrote:

      now it's let me add the share, so clearly it wanted that in .netrc...
      Very strange though since sftp doesn't need .netrc. I'll have to see if I can replicate this but I don't think I will be able to.
      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!
    • ptruman wrote:

      It glitched again when I tried to add another share, but stop/starting it and re-running mkconf seemed to have unstuck it.
      Try backing up your .netrc, removing it and see what happens
      I have a feeling this has something to do with the remotemount plugin and not the sftp 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!
    • I can't replicate this. I tried with a fresh OMV 3.x install with just the sftp plugin and no problems. Then I installed omvextras-netrc and no problems. Finally, I installed openmediavault-remotemount and had no problems. If you aren't using the remotemount plugin, try removing it to see if you have the problem.
      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!
    • Today I got the same problem. Some folder I can't add as share. Some folder I can add as share. I can't see a difference between the folders.

      For example, if I try to add my "Home-Folder" then I get this error:

      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': run-parts: /usr/share/openmediavault/mkconf/fstab.d/91-sftp exited with return code 1
      2. Fehler #0:
      3. 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': 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/bgstatusxw...', '/tmp/bgoutputm8...')
      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


      The crazy thing is, that it works for weeks until today. I got errors, while try to add a new share, and so I removed the shares and tried to add they again. Some I can add, some I can't add.

      I tried to uninstall openmediavault-sftp including purge the config files, remove /sftp and the commands you listed in this thread above. Nothings changes.


      I'm note sure, but I think there was an update from openmediavault-sftp today.

      Do you guys have any idea?

      Here is the output of dpkg -l | grep -E "openm|omv"

      Source Code

      1. mywebsql 3.7-omv1 all Web-based database manager for MySQL, SQLite and PostgreSQL.
      2. omvextras-common 3.0.1 all Shared files/libraries between various OpenMediaVault plugins.
      3. openmediavault 3.0.88 all Open network attached storage solution
      4. openmediavault-autoshutdown 3.1.4 all OpenMediaVault AutoShutdown Plugin
      5. openmediavault-backup 3.6 all backup plugin for OpenMediaVault.
      6. openmediavault-clamav 3.3.3 all OpenMediaVault ClamAV plugin
      7. openmediavault-docker-gui 3.1.9 amd64 OpenMediaVault plugin for Docker
      8. openmediavault-duplicati 3.0.2 all openmediavault duplicati plugin
      9. openmediavault-fail2ban 1.3.1 all OpenMediaVault Fail2ban plugin
      10. openmediavault-keyring 1.0 all GnuPG archive keys of the OpenMediaVault archive
      11. openmediavault-minidlna 3.3.10 all OpenMediaVault miniDLNA (DLNA server) plugin
      12. openmediavault-mysql 3.0.4 all MySQL plugin for OpenMediaVault.
      13. openmediavault-nginx 3.0.11 all Nginx plugin for OpenMediaVault.
      14. openmediavault-omvextrasorg 3.4.26 all OMV-Extras.org Package Repositories for OpenMediaVault
      15. openmediavault-sensors 3.0 all Provides a cpu temperature monitor
      16. openmediavault-sftp 3.1 all sftp server
      17. openmediavault-symlinks 3.1.3 all OpenMediaVault symlinks plugin
      18. openmediavault-usbbackup 3.2.20 all OpenMediaVault USB/eSATA backup plugin
      Display All

      The post was edited 1 time, last by StrongZero ().

    • StrongZero wrote:

      Some folder I can't add as share. Some folder I can add as share. I can't see a difference between the folders.
      I updated the plugin. Are you still getting the error?
      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:

      I updated the plugin. Are you still getting the error?
      I don't get the error, but unfortunately it doesn't work. After the update, I could add a share and "activate the config" in the omv admin interface, but the share doesn't exist in real. There is no folder in /sftp/StrongZero/, the new share isn't mounted and there is no new entry in /etc/fstab. And now, I can't remove the "defect" share in. I got this error message:

      Source Code

      1. Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; export LANG=C; umount "/sftp/StrongZero/Home"' with exit code '32':
      2. Fehler #0:
      3. 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; export LANG=C; umount "/sftp/StrongZero/Home"' with exit code '32': ' in /usr/share/php/openmediavault/system/process.inc:175
      4. Stack trace:
      5. #0 /usr/share/openmediavault/engined/rpc/sftp.inc(134): OMV\System\Process->execute(Array, 32)
      6. #1 [internal function]: OMVRpcServiceSftp->deleteShare(Array, Array)
      7. #2 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)
      8. #3 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('deleteShare', Array, Array)
      9. #4 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Sftp', 'deleteShare', Array, Array, 1)
      10. #5 {main}
      Display All

      To solve this problem, I created the folder "Home" under /sftp/StrongZero/, added it in /etc/fstab and mounted it manually. So I could remove the "not really added shares" on the omv admin interface and it removed my manual added entry in fstab and the folder "Home" successfully. Do you understand what I mean? (Sorry for my english) :) It looks like it can't remove the share, if it doesn't exist on the server or in fstab.

      But the bigger problem is, that it looks like, that adding a new share is working, but nothing is happen on the server. It only show the share in the omv admin interface.
    • StrongZero wrote:

      I don't get the error, but unfortunately it doesn't work. After the update, I could add a share and "activate the config" in the omv admin interface, but the share doesn't exist in real. There is no folder in /sftp/StrongZero/, the new share isn't mounted and there is no new entry in /etc/fstab.
      Did you give your StrongZero user read only or read/write privileges in the Privileges dialog in the Shared Folder tab? If not, nothing will be created since the user doesn't have privileges to access that shared folder.

      StrongZero wrote:

      And now, I can't remove the "defect" share in. I got this error message
      That is a bug. It is trying to unmount something that doesn't exist. I will fix that.
      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:

      Did you give your StrongZero user read only or read/write privileges in the Privileges dialog in the Shared Folder tab? If not, nothing will be created since the user doesn't have privileges to access that shared folder.
      Thanks a lot! This was the reason. Crazy that I set the priviliges for some folders and for some not.

      Now it works fine. Thank your very much! :)

      PS: For me, the sftp-plugin is the most used and one of the importants features of omv. :thumbsup:
    • StrongZero wrote:

      Thanks a lot! This was the reason. Crazy that I set the priviliges for some folders and for some not.
      Just updated the plugin and it won't let you create an sftp share that the user doesn't have read only or read/write privileges for now.

      StrongZero wrote:

      PS: For me, the sftp-plugin is the most used and one of the importants features of omv.
      I use it too.
      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!
    • After the last update I get the following error when I want to add a share:

      Source Code

      1. Error #0:
      2. exception 'OMV\AssertException' with message 'The key 'privileges.privilege' does not exist.' in /usr/share/php/openmediavault/dictionary.inc:92
      3. Stack trace:
      4. #0 /usr/share/php/openmediavault/dictionary.inc(111): OMV\Dictionary->assertExists('privileges.priv...')
      5. #1 /usr/share/php/openmediavault/config/configobject.inc(100): OMV\Dictionary->get('privileges.priv...')
      6. #2 /usr/share/openmediavault/engined/rpc/sftp.inc(116): OMV\Config\ConfigObject->get('privileges.priv...')
      7. #3 [internal function]: OMVRpcServiceSftp->setShare(Array, Array)
      8. #4 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)
      9. #5 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('setShare', Array, Array)
      10. #6 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Sftp', 'setShare', Array, Array, 1)
      11. #7 {main}
      Display All