Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Failed to mount (inactive): mount error(13) when mounting CIFS from Synology

Failed to mount (inactive): mount error(13) when mounting CIFS from Synology

Scheduled Pinned Locked Moved Solved Support
cifssambasynology
17 Posts 4 Posters 7.2k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 32463 Offline
    32463 Offline
    3246
    wrote on last edited by girish
    #1

    Hi there,

    When I try mouting a CIFS (Samba) share from my Synology Diskstation NAS, I get the following error:

    Failed to mount (inactive): mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
    

    My logs tell me that no dialect is specified and that I should manually specify it. However, this is all via GUI and I wanted to avoid messing with command line stuff to keep things simple. What should I do to resolve this? :s

    [173190.444124] CIFS: Attempting to mount //192.168.2.199/piwigo
    [173190.444141] No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
    [173190.533535] Status code returned 0xc000006d STATUS_LOGON_FAILURE
    [173190.533543] CIFS VFS: \\192.168.2.199 Send error in SessSetup = -13
    [173190.533614] CIFS VFS: cifs_mount failed w/return code = -13
    

    ๐Ÿ‘‰ Find our more www.bebraver.online

    1 Reply Last reply
    0
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #2

      The mount file is generated with the options mentioned at https://git.cloudron.io/cloudron/box/-/blob/master/src/mounts.js#L93

      Can you maybe try to adjust this (after editing that file, which is at /home/yellowtent/box/src/..., run systemctrl restart box) with options recommended by your Synology?

      32463 1 Reply Last reply
      0
      • nebulonN nebulon

        The mount file is generated with the options mentioned at https://git.cloudron.io/cloudron/box/-/blob/master/src/mounts.js#L93

        Can you maybe try to adjust this (after editing that file, which is at /home/yellowtent/box/src/..., run systemctrl restart box) with options recommended by your Synology?

        32463 Offline
        32463 Offline
        3246
        wrote on last edited by
        #3

        @nebulon found it!

        It doesn't like my super strong password, which contains special characters ๐Ÿ™‚

        When I wrap the password in "..." it accepts it!

        ๐Ÿ‘‰ Find our more www.bebraver.online

        nebulonN girishG 3 Replies Last reply
        0
        • 32463 3246

          @nebulon found it!

          It doesn't like my super strong password, which contains special characters ๐Ÿ™‚

          When I wrap the password in "..." it accepts it!

          nebulonN Offline
          nebulonN Offline
          nebulon
          Staff
          wrote on last edited by
          #4

          @3246 ah so you wrapped it in quotes in the .mount file for systemd? If this is the case, I guess we should always add quotes when generating this file.

          1 Reply Last reply
          0
          • 32463 3246

            @nebulon found it!

            It doesn't like my super strong password, which contains special characters ๐Ÿ™‚

            When I wrap the password in "..." it accepts it!

            girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #5

            @3246 Can you tell us what special characters it has? Does it have a comma or double/single quote ? From what I read from the man pages:

            https://manpages.debian.org/testing/systemd/systemd.mount.5.en.html says Mount options to use when mounting. This takes a comma-separated list of options. This setting is optional. Note that the usual specifier expansion is applied to this setting, literal percent characters should hence be written as "%%". . https://www.man7.org/linux/man-pages/man5/systemd-system.conf.5.html has the specifier table. It has no special meaning for double quotes AFAICT.

            https://linux.die.net/man/8/mount.cifs says Note that a password which contains the delimiter character (i.e. a comma ',') will fail to be parsed correctly on the command line. However, the same password defined in the PASSWD environment variable or via a credentials file (see below) or entered at the password prompt will be read correctly. . So, maybe we have to create a credentials file for this to be reliable.

            1 Reply Last reply
            0
            • 32463 3246

              @nebulon found it!

              It doesn't like my super strong password, which contains special characters ๐Ÿ™‚

              When I wrap the password in "..." it accepts it!

              girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #6

              @3246 ok, https://www.freedesktop.org/software/systemd/man/systemd.syntax.html has some more.

              Can you please try systemd-escape <your-password> and use that instead of quoting in the mount file? If that works, I can fix up our code accordingly.

              32463 2 Replies Last reply
              1
              • girishG girish

                @3246 ok, https://www.freedesktop.org/software/systemd/man/systemd.syntax.html has some more.

                Can you please try systemd-escape <your-password> and use that instead of quoting in the mount file? If that works, I can fix up our code accordingly.

                32463 Offline
                32463 Offline
                3246
                wrote on last edited by
                #7

                @girish @nebulon thanks both. The previous password contained: @ & ^

                It works OK on the command line, where I can escape it using double quotes or just pasting it in the prompt when running interactively.

                I will have a go with a test user and suitably complex password and report back, after trying the 'system-escape' option.

                ๐Ÿ‘‰ Find our more www.bebraver.online

                1 Reply Last reply
                0
                • girishG girish

                  @3246 ok, https://www.freedesktop.org/software/systemd/man/systemd.syntax.html has some more.

                  Can you please try systemd-escape <your-password> and use that instead of quoting in the mount file? If that works, I can fix up our code accordingly.

                  32463 Offline
                  32463 Offline
                  3246
                  wrote on last edited by
                  #8

                  @girish said in Failed to mount (inactive): mount error(13) when mounting CIFS from Synology:

                  @3246 ok, https://www.freedesktop.org/software/systemd/man/systemd.syntax.html has some more.

                  Can you please try systemd-escape <your-password> and use that instead of quoting in the mount file? If that works, I can fix up our code accordingly.

                  Sadly, this did not work. I also tried MD5 hashing but the only reliable way is to use a password without special characters so far ๐Ÿ˜•

                  ๐Ÿ‘‰ Find our more www.bebraver.online

                  girishG 1 Reply Last reply
                  0
                  • 32463 3246

                    @girish said in Failed to mount (inactive): mount error(13) when mounting CIFS from Synology:

                    @3246 ok, https://www.freedesktop.org/software/systemd/man/systemd.syntax.html has some more.

                    Can you please try systemd-escape <your-password> and use that instead of quoting in the mount file? If that works, I can fix up our code accordingly.

                    Sadly, this did not work. I also tried MD5 hashing but the only reliable way is to use a password without special characters so far ๐Ÿ˜•

                    girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by girish
                    #9

                    @3246 ๐Ÿ˜ž thanks for trying! If you don't mind trying one more approach:

                    • Create a credentials file like:
                    username=username
                    password=password
                    
                    • Then in the systemd mount file, do Options=credentials=/path/to/credentialsfile,..other options...

                    See articles like https://askubuntu.com/questions/1119819/how-do-i-use-a-credential-file-for-cifs-in-etc-fstab

                    I think we should do one of these:

                    • When complex passwords are entered in UI, we can inform the user about this limitation, so they don't end up with your situation.

                    • If credential file works, we will fix the code to use that approach.

                    32463 1 Reply Last reply
                    1
                    • girishG girish

                      @3246 ๐Ÿ˜ž thanks for trying! If you don't mind trying one more approach:

                      • Create a credentials file like:
                      username=username
                      password=password
                      
                      • Then in the systemd mount file, do Options=credentials=/path/to/credentialsfile,..other options...

                      See articles like https://askubuntu.com/questions/1119819/how-do-i-use-a-credential-file-for-cifs-in-etc-fstab

                      I think we should do one of these:

                      • When complex passwords are entered in UI, we can inform the user about this limitation, so they don't end up with your situation.

                      • If credential file works, we will fix the code to use that approach.

                      32463 Offline
                      32463 Offline
                      3246
                      wrote on last edited by
                      #10

                      @girish OK, slowly for those of us who don't read too well ;D

                      Do you mean /etc/fstab or some other way to put the options line in? I am familiar with the former but even after DuckDuckGoing for 2min not that much more clued in about the latter.

                      What do I do in the GUI?

                      ๐Ÿ‘‰ Find our more www.bebraver.online

                      girishG 1 Reply Last reply
                      0
                      • 32463 3246

                        @girish OK, slowly for those of us who don't read too well ;D

                        Do you mean /etc/fstab or some other way to put the options line in? I am familiar with the former but even after DuckDuckGoing for 2min not that much more clued in about the latter.

                        What do I do in the GUI?

                        girishG Offline
                        girishG Offline
                        girish
                        Staff
                        wrote on last edited by
                        #11

                        @3246 ha ha, sorry about that. Let me see if I can make a patch instead and test locally with special characters, might be easier.

                        32463 1 Reply Last reply
                        1
                        • girishG girish

                          @3246 ha ha, sorry about that. Let me see if I can make a patch instead and test locally with special characters, might be easier.

                          32463 Offline
                          32463 Offline
                          3246
                          wrote on last edited by
                          #12

                          @girish thank you ๐Ÿ™‚

                          ๐Ÿ‘‰ Find our more www.bebraver.online

                          1 Reply Last reply
                          0
                          • girishG Offline
                            girishG Offline
                            girish
                            Staff
                            wrote on last edited by
                            #13

                            I have tried to fix this with https://git.cloudron.io/cloudron/box/-/commit/dbb803ff5e3e837a7c8f49c4890bccc5329946d5 . Let's see if the situation is better in the next release.

                            1 Reply Last reply
                            1
                            • girishG girish has marked this topic as solved on
                            • J Offline
                              J Offline
                              jayonrails
                              translator
                              wrote on last edited by
                              #14

                              I have a similar issue when connecting to a Hetzner StorageBox system:

                              Failed to mount (inactive): mount error(128): Key has been revoked Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
                              

                              My settings are the following:

                              Bildschirmยญfoto 2023-02-04 um 13.40.00.png

                              Any tips on how to get this fixed? The git commit is some months old so I thought this might be already included in the latest Cloudron release?

                              Best
                              Jay

                              girishG 1 Reply Last reply
                              0
                              • J jayonrails

                                I have a similar issue when connecting to a Hetzner StorageBox system:

                                Failed to mount (inactive): mount error(128): Key has been revoked Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
                                

                                My settings are the following:

                                Bildschirmยญfoto 2023-02-04 um 13.40.00.png

                                Any tips on how to get this fixed? The git commit is some months old so I thought this might be already included in the latest Cloudron release?

                                Best
                                Jay

                                girishG Offline
                                girishG Offline
                                girish
                                Staff
                                wrote on last edited by
                                #15

                                @jayonrails said in Failed to mount (inactive): mount error(13) when mounting CIFS from Synology:

                                Key has been revoked

                                I think the error is coming from Hetzner . Did you possible revoke your existing key? Maybe you can generate new keys and try?

                                J 1 Reply Last reply
                                0
                                • girishG girish

                                  @jayonrails said in Failed to mount (inactive): mount error(13) when mounting CIFS from Synology:

                                  Key has been revoked

                                  I think the error is coming from Hetzner . Did you possible revoke your existing key? Maybe you can generate new keys and try?

                                  J Offline
                                  J Offline
                                  jayonrails
                                  translator
                                  wrote on last edited by
                                  #16

                                  @girish does key mean the password I received for the login? Or does it mean the authentication with an SSH Private / public key pair?

                                  This would also be possible on Hetzner Storage Box, but is not what I have configured. I am curious because in my understanding a password cannot be revoked, while a private key could be revoked, but is nothing I am using right now.

                                  I will check the credentials again and will let you know the results.

                                  Best
                                  Jay

                                  J 1 Reply Last reply
                                  0
                                  • J jayonrails

                                    @girish does key mean the password I received for the login? Or does it mean the authentication with an SSH Private / public key pair?

                                    This would also be possible on Hetzner Storage Box, but is not what I have configured. I am curious because in my understanding a password cannot be revoked, while a private key could be revoked, but is nothing I am using right now.

                                    I will check the credentials again and will let you know the results.

                                    Best
                                    Jay

                                    J Offline
                                    J Offline
                                    jayonrails
                                    translator
                                    wrote on last edited by
                                    #17

                                    @jayonrails SSH and SAMBA access havenโ€™t been enabled yet, therefore it didnโ€™t worked. After enabling it, everything works perfectly.

                                    1 Reply Last reply
                                    1
                                    Reply
                                    • Reply as topic
                                    Log in to reply
                                    • Oldest to Newest
                                    • Newest to Oldest
                                    • Most Votes


                                    • Login

                                    • Don't have an account? Register

                                    • Login or register to search.
                                    • First post
                                      Last post
                                    0
                                    • Categories
                                    • Recent
                                    • Tags
                                    • Popular
                                    • Bookmarks
                                    • Search