[SOLVED] Cannot connect to SMB shares [OMV 0.5]

    • [SOLVED] Cannot connect to SMB shares [OMV 0.5]

      Hello there,

      Hardware: HP ProLiant N54L
      OMV Version: 0.5.21
      Kernel: Linux 2.6.32-5-amd64

      I've problem to connect to my SMB shares ... after creating a shared folder and share it through SMB/CIFS I can see the share on the Windows (win7, win8 and android) network overview, but when trying to access the folder I always get the error message:

      Source Code

      1. error code: 0x80070035
      2. network path cannot be found


      or (if trying via DOS and "net use")

      Source Code

      1. net use x:\ \\HPSERVER\share1 /USER:user1
      2. #or
      3. net use x:\ \\HPSERVER\IPC$\share1 /USER:user1
      4. System error 67 has occured. The network name cannot be found.


      Any idea?
      I've redo the OMV installation and only do the config for SMB and user (to be sure that there is no sideeffect from plugins)- still the same error...


      Samba Config:

      Source Code

      1. root@HPServer:/etc/samba# more smb.conf
      2. #======================= Global Settings =======================
      3. [global]
      4. workgroup = WORKGROUP
      5. server string = %h server
      6. include = /etc/samba/dhcp.conf
      7. dns proxy = no
      8. log level = 0
      9. syslog = 0
      10. log file = /var/log/samba/log.%m
      11. max log size = 1000
      12. syslog only = yes
      13. panic action = /usr/share/samba/panic-action %d
      14. encrypt passwords = true
      15. passdb backend = tdbsam
      16. obey pam restrictions = yes
      17. unix password sync = no
      18. passwd program = /usr/bin/passwd %u
      19. passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
      20. pam password change = yes
      21. socket options = TCP_NODELAY IPTOS_LOWDELAY
      22. guest account = nobody
      23. load printers = no
      24. disable spoolss = yes
      25. printing = bsd
      26. printcap name = /dev/null
      27. unix extensions = yes
      28. wide links = no
      29. create mask = 0777
      30. directory mask = 0777
      31. map to guest = Bad User
      32. use sendfile = yes
      33. aio read size = 16384
      34. aio write size = 16384
      35. null passwords = no
      36. local master = yes
      37. time server = no
      38. wins support = no
      39. #======================= Share Definitions =======================
      40. [share1]
      41. path = /media/94a05dfd-ece8-47a5-9551-a7e013265bce/shares/data/
      42. guest ok = yes
      43. read only = no
      44. browseable = yes
      45. inherit acls = yes
      46. inherit permissions = no
      47. ea support = no
      48. store dos attributes = no
      49. printable = no
      50. create mask = 0755
      51. force create mode = 0644
      52. directory mask = 0755
      53. force directory mode = 0755
      54. hide dot files = yes
      55. invalid users =
      56. read list =
      Display All
    • Re: Cannot connect to SMB shares [OMV 0.5]

      What happens when you try to access your NAS with the IP instead of the hostname?

      How did you setup permissions when you created the shared folder in the first time?

      Greetings
      David
      "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"

      Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.


      Upload Logfile via WebGUI/CLI
      #openmediavault on freenode IRC | German & English | GMT+1
      Absolutely no Support via PM!

      I host parts of the omv-extras.org Repository, the OpenMediaVault Live Demo and the pre-built PXE Images. If you want you can take part and help covering the costs by having a look at my profile page.
    • Re: Cannot connect to SMB shares [OMV 0.5]

      @davidh2k:
      Access with IP or Hostname is the same. Normally I would use the IP as I have only a small home network...

      The user has been set up very simple, just name "user1" and password. Then give access via Access Right Management | Shared Folders. No ACL has been set.

      @tekkbebe:
      here you are

      Source Code

      1. stat data
      2. File: „data“
      3. Size: 4096 Blocks: 16 IO Block: 4096 Verzeichnis
      4. Device: 97fh/2431d Inode: 140509187 Links: 3
      5. Access: (2775/drwxrwsr-x) Uid: ( 0/ root) Gid: ( 100/ users)
      6. Access: 2013-11-17 11:35:57.257494949 +0100
      7. Modify: 2013-11-17 11:00:33.201670518 +0100
      8. Change: 2013-11-17 14:10:25.362571713 +0100


      Source Code

      1. stat shares
      2. File: „shares“
      3. Size: 4096 Blocks: 8 IO Block: 4096 Verzeichnis
      4. Device: 97fh/2431d Inode: 140509185 Links: 4
      5. Access: (0700/drwx------) Uid: ( 0/ root) Gid: ( 0/ root)
      6. Access: 2013-11-17 12:07:40.981464689 +0100
      7. Modify: 2013-11-17 10:47:54.484114402 +0100
      8. Change: 2013-11-17 10:47:54.484114402 +0100
    • Re: Cannot connect to SMB shares [OMV 0.5]

      Additional info:

      if I try to map the network drive in Windows (Explorer) and set the option "sign in with a different account" - I can't log in to the HP Server - after trying the logon "user1" three times I get the network error message again... :/

      Note: I have no problem with SMB and my old Synologic DS in the same network ...
    • Re: Cannot connect to SMB shares [OMV 0.5]

      The "shares" folder is not root:users and is chmod 700.

      Did you not want some users to access it? How many users on your system? If there is just you and the share does not need 700 chmod....

      chown -R root:users shares
      chmod -R 775 shares

      I saw you just have 1 user. The shares folder is likely the issue. If you these commands it should work.
    • Re: Cannot connect to SMB shares [OMV 0.5]

      Sorry - "shares" is just a sub-folder for my shared directories

      Looks like:
      hdb /hdc -> raid1 -> mounted on media/<uid>/
      shares
      -> data (that is my folder which I like to share for my pc and laptop)

      So no one needs access to the "shares" folder. And for "data" the access is given to the user "user1" already if I get this right...
    • Re: Cannot connect to SMB shares [OMV 0.5]

      Yes, but do you want to access the shares subfolder??? As it is setup right now in your data folder you will not be able to access it. If you data folder is the main one and you want to access all of it's subdirectories do this:

      chown -R root:users data (these 2 commands are normally setup via the dropdown when you create a shared folder)
      chmod -R 775 data

      Again be one leve up from the data folder so you can list it before you run these commands.

      To give a user access rights go to:

      Access Rights Management/Shared Folders/ then on right highlight the folder and click on privileges or acl.
    • Re: Cannot connect to SMB shares [OMV 0.5]

      Thats why I asked what did you set it up in the first place when creating the share. I guess you used administrator R/W only and deny all other access. This sets the chmod to 700 which tekkebebe already explained is just wrong.

      Greetings
      David
      "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"

      Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.


      Upload Logfile via WebGUI/CLI
      #openmediavault on freenode IRC | German & English | GMT+1
      Absolutely no Support via PM!

      I host parts of the omv-extras.org Repository, the OpenMediaVault Live Demo and the pre-built PXE Images. If you want you can take part and help covering the costs by having a look at my profile page.
    • Re: Cannot connect to SMB shares [OMV 0.5]

      Yes, that is what it looks like David. He was probably thinking just he wants access (owner). But his user is not root user. So he needs chmod 760 at a minimum.

      Your data folder is inside the shares folder, yes? If you have chmod 700 and root:root ownership on the shares folder you will not be able to get inside it to the data folder.

      chown -R root:users shares
      chmod -R 775 shares

      Then make sure you give read/write privileges to your user1 in the:

      Access Rights Management/Shared Folders/ then on right highlight the folder and click on privileges or acl.
    • Re: Cannot connect to SMB shares [OMV 0.5]

      Works!

      I'm still confused why I have to give the user manual access to the sub-folder - but that solved the problem...

      But If I start thinking... ok as an user with no access I can't perform any action - that is one of the big differences between Windows and Unix. But shouldn't this be set automatically when I share a folder in the ARM?

      Many thanks both of you for your help!
    • Re: Cannot connect to SMB shares [OMV 0.5]

      I added to my last post. Read it again and do what I say and you should be good.


      You just need to learn the proper steps to setup the shared folder. When you create a shared folder use the default.

      Administrators: read/write Users: read/write Others: read only

      This gives the shared folder
      chown root:users (root is owner and users is the group. a user created in the web-gui is automatically part of the users group)
      chmod 775 (permissions)

      Remember that if you can't access a folder you will not be able to access anything in it either.

      Here is a chmod (permissions) calculator to help you understand permissions numbers faster ( read , write , execute)

      javascriptkit.com/script/script2/chmodcal.shtml
    • Re: [RESOLVED] Cannot connect to SMB shares [OMV 0.5]

      Remember if you use Putty to create a folder in a shared folder you are going to have to chown and chmod the new folder. Otherwise it will not work via SMB/CIFS. If you use a Windows machine to connect to the share create any new folders via the share on your windows machine. That is much easier.
    • Re: [RESOLVED] Cannot connect to SMB shares [OMV 0.5]

      Using Fedykin 0.4 on HP54 server loaded with data, music and videos for a small home network of 3 or 4 PC's - all fine with Win7 machines but have now added a Win8 system from which cannot see the OMV at all. All the PC's have the same user name and password. But the win8 system has Microsoft email address and different password but I am not sure that this is relevant when accessing the OMV system. I would like to try to keep everything as simple as possible - it seems to me that the problem is probably in the user set-up and access rights on the OMV system but do I need to upgrade the OMV to 0.5 to be compaible with Win8?