Windows issues with unRAID


RobJ

Recommended Posts

Yes I can use the IP address.  And I know I can create a link to the IP address but that doesn't help inside programs.  I really wish this would just work like it's supposed to and Tower would show up in Network.  Then it's easily accessible from programs or anywhere in Windows without the need for shortcuts and mapping a bunch of shares and stuff.

Link to comment

I've been struggling since I got Unraid to find an answer as to why I haven't been able to connect to my Unraid server via SMB version 2.0 and above on Windows 10.

 

I went through many threads here in the forum and a few more places, other than having SMB 1.0 activated, none of the solutions I could find worked.

 

Until now...

 

I'm sharing my solution in case this might help others in a similar situation. This is meant for people that haven't managed to get any of the other solutions working for SMB 2.0 and above.

 

The main points of my situation were:

  • SMB 1.0 activated - access worked immediately
  • SMB 1.0 deactivated - Windows prompted a network error saying 'Windows cannot access ________' or 'Network path not found' when I tried accessing my shares
    • Neither connecting to hostname (e.g.  \\tower) nor IP address ( e.g. \\192.168.x.x) worked
    • However sending a PING through CMD/Powershell to both the hostname ( \\tower) and IP address ( \\192.168.x.x) received a reply from the server
  • Enabling insecure guest logons solution in this thread did not solve my issue:


If the points above match your situation then follow my solution below. If your situation differ from above, e.g. ping doesn't generate a reply, your issue might be caused by something else.

 

 

Instructions:

 

TL;DR: For some reason Workstation service was stopped when SMB 1.0 was disabled. If Workstation service is stopped, try turning it on, if it runs = problem solved. If error 1075 pops up, delete keys "DependOnService" and "DependOnGroup" under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation then reboot. Now start Workstation service, done.

 

 

  1. If you haven't already, uncheck everything related to
    SMB 1.0/CIFS File Sharing Support
    to disable SMB 1.0. You can find it under:
    Control panel -> Programs -> Turn Windows features on or off. Press OK when done and reboot if necessary.
     
  2. Open Windows Start menu and search for Services and click on it. Alternatively, press Windows key + R and enter services.msc to open it.
     
  3. In the Services window that opened find a service called:
    Workstation

    - This is the Windows service that handles the SMB protocol communication

    Right click on it and open Properties. Check the Service Status, does the status say Stopped? Good.
    (However, if it does say Running and you still cannot access your shares on Windows via SMB versions above 1.0 unfortunately this solution won't work for you.)
     

  4. Now try starting the service clicking on the Start button. This did not work for me, I received an error that said:

    Quote

    Could not start the Workstation service on Local Computer. Error 1075 the dependency service does not exist or has been marked for deletion.


    image.png.69f4db0c36a26096c61d491b1d27eb5a.png

    Continue to the next step if you received this error as well.

    If it actually started for you then great you're done, make sure Startup type is set to Automatic and click on Apply and OK. This should now allow you to establish SMB connection and access your shares.

    5. Open up the Registry Editor either through the Start menu by searching for Registry Editor or press Windows key + R and enter regedit.
    Navigate to:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation

    Select LanmanWorkstation and on the right side you should see several keys. Look for two keys called DependOnService and DependOnGroup. I only had one of them, DependOnService.
    - Before you do any changes here export the LanmanWorkstation registry file as a backup, just in case something goes wrong.
    Delete only the two keys (or the one you have) mentioned above, after that reboot your computer.
     

  5. Finally, go back into Services and start the Workstation service which should now start successfully. Confirm that the Service Status says Running and Startup type is set to Automatic, hit apply and OK if needed.
     

That's it. You should now be able to establish SMB connection and access your shares with a more secure version of the SMB protocol.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 

I have confirmed that SMB is using a higher version than 1.0 between my PC and Unraid. I used the following command in Powershell (run as admin):

Get-SmbConnection

The output gives you information about connections to shares:

ServerName ShareName UserName       Credential              Dialect NumOpens
---------- --------- --------       ----------              ------- --------
tower      Documents PC\BrunoX      MicrosoftAccount\user   3.1.1   1

Dialect equals SMB version.

Link to comment
  • JorgeB pinned, unpinned and pinned this topic

I have a similar but different issue with my Windows machine. To backup my computer I use Veeam Agent. I also use the UnRAID box as a NAS, so I have a share mapped in Windows Explorer to access my files. The issue is that Veeam gets a "Failed to create or open file error" if I try to login with the same credentials I use to access the NAS from Windows Explorer. The way around this issue is to make a separate account on UnRAID and use that with Veeam, but of course that's not optimal. Any idea how to fix this?

Edited by CeeJay
Link to comment

All, can't tell if this is a Windows 10 issue or not but here it goes.....

Recently had to re-install Windows 10 Pro and everything connecting to shares were fine for a few days.  Then in the last two days I noticed that MusicBee was unable to edit files.  After searching here and on MusicBee forums it turned out to be a permissions issue.

 

I fixed it by using Spaceinvader One's videos (Thank you!) and this forum (Thanks for everyone's posts!) by switching all shares to private where now MusicBee is able to edit files and other applications don't appear to have issues accessing files again.  Now I've run into another issue.  I'm trying to delete files over SMB using Windows 10 file explorer and receiving an error that the directory or file is owned by "nobody".

 

I've tried flipping all shares back to public and disconnecting and reconnecting network drives to no avail.  The 'smbstatus' command on the terminal is showing all files as read only and thus not able to sometimes move or delete files.

 

Here's my current SMB settings on unraid:

[global]
  comment = Fix to read/write
  security = USER
  guest account = nobody
  public = no
  guest ok = no
  map to guest = bad user

#unassigned_devices_start
#Unassigned devices share includes
   include = /tmp/unassigned.devices/smb-settings.conf
#unassigned_devices_end

And here are logs related to samba after my last unraid reboot about a little while ago.....

Mar 21 15:14:07 unHRTATTK root: Starting Samba:  /usr/sbin/smbd -D
Mar 21 15:14:07 unHRTATTK root:                  /usr/sbin/nmbd -D
Mar 21 15:14:07 unHRTATTK root:                  /usr/sbin/wsdd 
Mar 21 15:14:07 unHRTATTK root:                  /usr/sbin/winbindd -D
Mar 21 15:14:13 unHRTATTK emhttpd: shcmd (408): smbcontrol smbd close-share 'Video'

I have a feeling this may be a Windows 10 permissions issue but have no idea how to fix it.  I've been through Microsoft's forums and other sites to see how to change ownership with no success.

 

I've also reestablished connectivity initially by joining the workgroup and that worked for a short while although I think I would like to keep the shares in a private state.

 

Does anyone have any ideas as what else to do so that I have full control over the shares/files from my windows 10 machine?

 

Update 1:

So when I come to a folder that I can't manipulate in windows explorer I have been going through the terminal and chown'ing each folder recursively in order to either move files or delete folders I couldn't previously.  Does this make sense?  Is this something that can be done in unraid I'm not aware of?

Edited by HrtAttK
Possible workaround #1
Link to comment
On 3/18/2020 at 8:05 AM, CeeJay said:

Scaling is an issue, since now I have to manage twice as many accounts for the same amount of users.

Having a separate account for Veeam is actually recommended, as is most backup software.  It's not unusual because you can't have same user account accessing same share and backup at same time.  It would create a massive amount of errors and /or corruption.

Just don't become an admin :) You have to keep track of accounts for hundreds of different services and security features to do it correctly.

Edited by fwiler
Link to comment
On 3/21/2020 at 4:57 PM, HrtAttK said:

've also reestablished connectivity initially by joining the workgroup and that worked for a short while although I think I would like to keep the shares in a private state.

 

Does anyone have any ideas as what else to do so that I have full control over the shares/files from my windows 10 machine?

I don't know if this will help but have a read through this thread:

       https://forums.unraid.net/bug-reports/stable-releases/680-file-permissions-through-samba-are-set-to-adminusers-and-not-nobodyusers-r803

 

Notice the Global option to force owner/group attributes to nobody/users in this post:

      https://forums.unraid.net/bug-reports/stable-releases/680-file-permissions-through-samba-are-set-to-adminusers-and-not-nobodyusers-r803/?tab=comments#comment-8772

 

 

EDIT:  This will affect only future files added via SAMBA.  It will not change files that are already on the server!

Edited by Frank1940
Link to comment
  • 3 weeks later...

System setup - Win 10 Pro laptop, Unraid server

 

Unfortunately it's my turn to jump on the share folder issues. The username matching fix helped me out early only but now I'm running into problems. Mine's a bit different than the one's I've read so far though. Recently setup my Unraid server and used a lot of SIO guides including the 'ultimate rootshare' setup. I did not realize at the time but I never had a working (permission wise) 'Media' share via the rootshare or the self-setup option. I was having permission issues trying to use TinyMediaManager on the folders within Media share and thought nothing of it originally and charged forward.

 

Fast forward to today - I restarted the server and my 'ultimate rootshare' and personally setup shares failed to reappear. I troubleshot for an hour before a restart of my laptop solved that. Frustrating to say the least. Now I have discovered that I specifically cannot write to my 'Movies' or 'TV' folder within my 'Media' share. All of my other shared folders, including the parent 'Media' itself, work just fine - appdata, download, isos, etc. I created test folders in a handful of other shares to verify and I have no issues. Its specifically trying to write/modify within those two.

 

Hoping @Frank1940 or some of the pros might know the obvious answer I'm missing here.

 

Edited by DoesItHimself
Link to comment
8 hours ago, DoesItHimself said:

Hoping @Frank1940 or some of the pros might know the obvious answer I'm missing here.

Read very carefully this post from LimeTech:

 

        https://forums.unraid.net/topic/25064-user-share-problem/?tab=comments#comment-228392

 

Where this really comes around to bite you is if you have a share that is 'Secure'.   Apparently, if your first access to this share is a read operation, you will get logged in as 'nobody'.  If you later try to write to this Secure share, you will not be prompted to login, you will only be told you don't have permission...

 

Now, about that problem with the 'Movies' and 'TV' folders.  You are going to have to use the command line to see what the permissions are on those files and folders.  (Use the Terminal that is part of the GUI.)  I will give you an example of both the command and the output:

root@Elsie1:~# ls -al /mnt/user
total 3499216
drwxrwxrwx  1 nobody users          58 Apr 12 01:30 ./
drwxr-xr-x 11 root   root          220 Apr  9 09:51 ../
drwxrwxrwx  1 nobody users          29 Jul 15  2019 Backup/
drwxrwxrwx  1 nobody users         118 Nov 19  2017 CommunityApplicationsAppdataBackup/
drwxrwxrwx  1 nobody users          75 Nov  2 17:03 Data/
drwxrwxrwx  1 nobody users          33 Dec 13 17:19 Folder_Tree/
drwxrwxrwx  1 nobody users         125 Apr  8 22:04 Media/
drwxrwxrwx  1 nobody users         146 Mar 23 17:33 appdata/
-rw-rw-rw-  1 nobody users 10737418240 Apr 14 08:51 docker.img

And moving down the tree:

root@Elsie1:~# ls -al /mnt/user/Media
total 43732856
drwxrwxrwx 1 nobody users         125 Apr  8 22:04 ./
drwxrwxrwx 1 nobody users          58 Apr 12 01:30 ../
-rw-rw-rw- 1 nobody users     4634361 Jun 18  2017 .IMG_3276.JPG
drwxrwxrwx 1 nobody users        4096 Apr  8 22:04 All\ Movies/
-rw-rw-rw- 1 nobody users 44599541760 Feb 10  2017 DISNEY_WOW_Calibration.iso
drwxrwxrwx 1 nobody users           6 Mar 12  2014 DVD\ Calibration/
drwxrwxrwx 1 nobody users         206 Apr  8 22:04 Family\ DVD\ Videos/
drwxrwxrwx 1 nobody users          71 Jun 21  2017 Music/
-rw-rw-rw- 1 nobody users   178259492 Oct 20  2016 Nathaniel-Ashley-Wedding.pdf
drwxrwxrwx 1 nobody users          85 Jun 21  2017 Trailers/

The BASH shell that Unraid uses has a editor built into it. So be sure to experiment with the 'arrow' keys after you have entered a couple of commands!  IF you don't understand what is being displayed or it doesn't 'look' like what is above in these examples, ask.  (Anything that begins with a  'd'   is a directory.  Anything that begins with a   '-'   is a file.)

 

You can also try running the New Permissions script in the Tools menu on just the 'Media' share.   If that fixes it, you have a problem with some Docker or plugin not being properly configured.  That is not a problem if you have only one of these which adds files to that share but if you have more than one, you have wiped out any evidence that points to the culprit.

Edited by Frank1940
Link to comment

@DoesItHimself

 

Hey, I'm still having issues.  Sometimes it works and sometimes it doesn't.  Reading the above post I may try running the "New Permissions" script again.  Now, I have directories I deleted and went through removing them from dockers, etc.

 

But, directories keep reappearing with random users not set like "linux user".

----------------------------------------------------------------------------

I just checked again and deleted more paths and libraries internal to plex so hoping that's the culprit.

 

We'll see.....

Link to comment
  • 3 weeks later...

I would like to post an additional solution to the board.

I had zero problems with the windows 10 smb/cifs homegroup shaing in v6.4.1 . My issue was the upgrade.

Going from 6.4.1 to 6.8.x would break my smb shares completely. I did some forum searching, lots of reading, some config gap analysis checking and using the command smbstatus I discovered that the smb.conf line 'name resolve order = bcast lmhost host wins' was not working for me in samba v4.11.4.

 

*I removed lmhost from the line for my samaba 4.11.4 configs.*

 

now my shares work like they did in 6.4.1.

 

happy guy here :)

Link to comment
  • 2 weeks later...
On 4/30/2020 at 7:48 AM, cuutip said:

I would like to post an additional solution to the board.

I had zero problems with the windows 10 smb/cifs homegroup shaing in v6.4.1 . My issue was the upgrade.

Going from 6.4.1 to 6.8.x would break my smb shares completely. I did some forum searching, lots of reading, some config gap analysis checking and using the command smbstatus I discovered that the smb.conf line 'name resolve order = bcast lmhost host wins' was not working for me in samba v4.11.4.

 

*I removed lmhost from the line for my samaba 4.11.4 configs.*

 

now my shares work like they did in 6.4.1.

 

happy guy here :)

That's really interesting, one of my Windows PC (only one running Windows 10 Pro if that matters) has been having an issue ever since the 6.8 update (I think).  At first I thought it might be the same issue that those folks with 10's of thousands of files in a directory were seeing, but it only affects one of my Windows machine.  The problem I'm having is that browsing my unraid box is incredibly slow over samba, and right now Windows is bugging me that my file history share is gone.  And indeed when I tried to browse to \\unraid\backup (the share where that's located), it took, 30, maybe a minute or more to come up (didn't think to actually time it).

 

Now the odd thing for me is, if I go to \\unraid.local\backup, things are just as snappy as I'd expect.  I haven't had to do this on any of my other Windows PCs.

Link to comment

I need assistance with my 6.7.2 version of Unraid.  For the past couple of days I've seen my dashboard showing now drives, nothing visible and the array not started.  I can ssh and can see by USB boot drive, but cannot do anything.  I looked at /var/log/dmesg and see my drives, but Unraid GUI does not.  I've rebooted a few times to see if there would be a difference.  I don't see anything.  I'd like to try and run diagnostics, but there is nothing how to run from CLI only the GUI.  Can you look at my screenshots and provide some troubleshooting steps?  I'm not too worried at this point because I'm sure the data on the drives is still there.  Just gotta get back up the Unraid server application.

Screen Shot 2020-05-22 at 4.11.21 PM.png

Screen Shot 2020-05-22 at 4.10.56 PM.png

Link to comment
34 minutes ago, jgonzalez888-abc said:

I need assistance with my 6.7.2 version of Unraid.  For the past couple of days I've seen my dashboard showing now drives, nothing visible and the array not started.  I can ssh and can see by USB boot drive, but cannot do anything.  I looked at /var/log/dmesg and see my drives, but Unraid GUI does not.  I've rebooted a few times to see if there would be a difference.  I don't see anything.  I'd like to try and run diagnostics, but there is nothing how to run from CLI only the GUI.  Can you look at my screenshots and provide some troubleshooting steps?  I'm not too worried at this point because I'm sure the data on the drives is still there.  Just gotta get back up the Unraid server application.

Screen Shot 2020-05-22 at 4.11.21 PM.png

Screen Shot 2020-05-22 at 4.10.56 PM.png

Open a new thread and post your diagnostics.   Doesnt appear to be relevant to this thread 

 

If you cant hit diagnostics from the UI enter in diagnostics at a command prompt

Link to comment
  • JorgeB unpinned this topic
  • JorgeB pinned this topic
  • 4 weeks later...

Hello there,

Upon looking over this topic I don't think I've seen anything resembling my issue.

My issue is that the permissions I set for shares in Unraid are being ignored on my mapped drives in windows (and linux) which means I have r/w permission for all shares, no matter the security set for each and additionally the export setting is being ignored and even the shares which have export set to no are visible.

For example I can r/w on a private share which should only be accessible by a different user and I can r/w on a secure share even tho it's set as r/o for my username. I'm trying to avoid public shares (was reading that ransomware topic :D) and I am logged in on windows via credential manager which is set to correct user and password as set in Unraid.

 

This is my setting for mapping the share in windows:

[Tower]
path = /mnt/user
comment =
browseable = yes
valid users = davor
write list = davor
vfs objects =

 

firefox_hAZ0vl6dNb.jpg

brave_QCC3kx61qy.png

Edited by Ver7o
Link to comment

Not sure I understand what you are trying to do with this:

2 hours ago, Ver7o said:

This is my setting for mapping the share in windows:

[Tower]
path = /mnt/user
comment =
browseable = yes
valid users = davor
write list = davor
vfs objects =

If you are giving Windows access to /mnt/user, then you are bypassing the security of individual Unraid user shares and just giving it all of the user shares as one share, so no separate user share security.

 

You should map each share separately, or better yet, don't map anything. I never "map drives" to network resources anymore, since it is simpler to just browse the network, and most applications can browse the network too so no need for "mapped drives".

Link to comment

@Ver7o, As I look at your Shares, I see that you have Public, Secure and Private shares.  You should always make sure that you access your Private share first so that you force a login.  The reason for this is that it is possible that you can be given 'guest' access to a share and SMB will only allow one connection from each client computer.  In that case, when you attempt to access your Private share, it will always fail and the failure message will not really tell you what the problem is...

Edited by Frank1940
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.