mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
Unable to access mounted drives (NAS) in Windows #956
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @defeatedbythecat on GitHub (Oct 3, 2019).
Originally assigned to: @anthonylavado on GitHub.
Describe the bug
During setup, the network box returns no entries and jellyfin server see's nothing but the C: drive. Despite there being other mapped drives.
System
Additional context
Using a Synology NAS containing the media.
@anthonylavado commented on GitHub (Oct 3, 2019):
@defeatedbythecat Are you using the Installer version of Jellyfin?
@defeatedbythecat commented on GitHub (Oct 4, 2019):
Yeah using the new installer
@anthonylavado commented on GitHub (Oct 5, 2019):
Okay. So this is a side effect of the way the installer sets up Jellyfin with the “Network Service” account. It likely doesn’t have permissions to access your shared drives. @EraYaN had a better explanation, but I forget what it is.
@HansGruberXXV commented on GitHub (Oct 8, 2019):
I'm having the same issue. I've set up permissions, i think. Added Network Service to Users and I get an message box saying that it couldn't start the service but that it didn't throw an error. This is using the most recent download of 10.4 x64
@EraYaN commented on GitHub (Oct 9, 2019):
Network Service (and Local System) for that matter can only access network shares or mounted drives in a Windows Domain environment. Since they identify themselves as the computer account on the network. So outside a domain the target host has no idea about the client host and can't give it access.
Your best bet is to create a new user that is named (for example
Jellyfin) and use thenet useandrunascommands to give that user the credentials to the share. Then Jellyfin should be able to enumerate the shares.I suppose the other option is to do full public samba shares, but that is very insecure. (It's guest access in the samba config) That should work, although I'm not 100% on that.
@HansGruberXXV commented on GitHub (Oct 10, 2019):
Wow, thanks for the advice!
I think I'm in a little over my head here. I have the drives mapped as Z:\ for movies and Y:\ for TV. I'd prefer to leave them in their current state as multiple programs use them for downloading, sorting, cataloguing etc. I've created the user jellyfin and added it to the users group and then made sure it has access permission to the folder that jellyfin.exe is located so that I can use that account to run as a service.
Where I would appreciate some guidance is how to add the network share access to the jellyfin user account. I've looked at net use but as the drives are already mapped it tells me it can't map them for another user. Runas seems to be looking for an exe to run, unless I'm mistaken about it's usage. I'm sorry to be a pain, I feel super close to having the damn thing work, haha.
@EraYaN commented on GitHub (Oct 14, 2019):
Well yes those drives are user based, and mapping to multiple users is impossible. It might be the easiest to just use netuse to provide the credentials for the sharename directly. And use that, I believe jellyfin should be able to work with UNC paths. runas can be used to run net use as the jellyfin user without actually login in to that user, although using it can be a bit finicky, but think of it as
sudo -Hu@defeatedbythecat commented on GitHub (Oct 15, 2019):
Is this something that might be worked out in future releases, or is it an inherent issue with the way windows works?
I know it's a completely different piece of software, but shouldn't Plex suffer from a similar issue if it's a windows problem?
@anthonylavado commented on GitHub (Oct 15, 2019):
@defeatedbythecat It’s an inherent issue with the way Windows works - when you’re running as a service. Plex and Emby do not run as a service, they require you to login and start/auto-start the app. This feature is in the works.
@krizly commented on GitHub (Oct 22, 2019):
Possibly related to this issue but not sure if maybe there's something else going on -
I have just setup a clean install of Jellyfin 10.4.0 on a new install of Windows 10 which is connected to a domain and installed using a network service account. Signed in to Windows10 with UserX, changed the Jellyfin service to run as UserX. Have mapped drives to D and Z under UserX, but neither show up when trying to add folders to a library, and trying to manually add the server path in the 'Shared Network Folder' field fails.
Also tried it just as the Network Service account and added the computer AD account to the network share group so it had access, but still couldn't access the network shares from Jellyfin.
EDIT - EraYan solved it, used the wrong field to enter the file path. I swear I tried both fields last time I was playing with it but apparently it's working now.
@EraYaN commented on GitHub (Oct 26, 2019):
Mmm if you enter the full UNC path in the main path operation and all computers are on the same AD domain AND the computer account has access to both the share AND the NTFS files, theoretically this should mean jellyfin should be able to read those files.
Also I think mapped drives might not get mounted when using services (although it marked to be remembered they should)
Also the "Shared Network Folder" option is the path to be passed to certain clients to access the same files (Kodi mostly) but you also need to enter that same network path in the main path selector.
@stale[bot] commented on GitHub (Mar 23, 2020):
This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.
If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.
This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.
@neumachen commented on GitHub (Aug 20, 2020):
@EraYaN, can you perhaps give a tutorial on how to achieve this? I tried
net usebut I don't think I'm doing it right.@fthorsen76 commented on GitHub (Oct 14, 2021):
I just installed a new Windows Server 2022 VM, and was struggling with this same issue. This is how I solved it;
That should do it. Now I only have to figure out what rights the service accounts needs so that it doesn't need to run as a local admin user. Right now the service throws an error 143 in the event log. The account automatically is granted the log on as a service right when adding it in step 3, so it must be something else.
@anthonylavado commented on GitHub (Oct 16, 2021):
@fthorsen76 Thanks for your comments on this. I don't run it extensively on Windows, but as the maintainer of the tray app/installer, this is useful for me to add to the documentation. It'll help add to the installer to make sure things are as smooth as possible for new users.
Note to team: Leave this one open for me, I'll transfer to server-windows soon.
@tenntenntenn commented on GitHub (Jan 16, 2022):
Hello - just wanted to add to this (apologies if its not the correct place, new to jellyfin, github, etc):
I have a storage server with all my content on Windows Server 2019 Core ("STORAGE"), and a media server on Windows Server 2019 (non-core) ("MEDIA"), non-domain. I created a service account on both with the same username/password. I made sure that MEDIA can reach the files on STORAGE. I installed Jellyfin on MEDIA, set it's service to run as the service account, started it up, went through the wizard, got stuck at trying to add the path to my content on STORAGE. Was initially trying:
...didn't work, looked it up, found that Jellyfin can't use that, and the general guidance I found was to map a network drive on the Jellyfin server. So I did so, mapping the location \STORAGE\media to M:, and making sure that the drive was under the service account and something else (like the local administrator). I confirmed I could see and access the drive in Windows in Network Locations. So I then tried:
Did not work. So I dug around a bunch, tried a few different things, tried reinstalling Jellyfin (note on a separate issue I found on that below), until I found this thread and the above comment by @fthorsen76 . So I tried:
...didn't work. So then tried:
...and that worked.
To note (sorry for being off topic): on reinstall, Jellyfin wouldn't run through the first time install process of creating a new user. It asks me to select my server (which I was already navigated to in my browser), then asks for a username/password. The account I created before the reinstall did not work, so I did not have a way to get in. I chose the option during the uninstall to remove local data, and confirmed it was gone in C:\programdata\jellyfin (and also poked around a few other common locations in Windows). Uninstalled, restarted the server, confirmed old data was gone, reinstalled, same issue. Found a guide on resetting this, by going to C:\ProgramData\Jellyfin\Server\config\system, and setting
<IsStartupWizardCompleted>true</IsStartupWizardCompleted>to false.... but it was already false. So I stopped the service, set it to true, started the service, then stopped the service, set it to false, and started the service, and it then brought me through the first time startup again.@ArtrixTech commented on GitHub (Apr 27, 2022):
That worked for me. Thanks!
@fernvenue commented on GitHub (Jun 11, 2023):
Same here, and I just fixed and tested it on version 10.8.10, that's the latest version when I write this, let me explain how I did it, hope this can help others.
As @fthorsen76 mentioned, same username and password is required, if not, change it first. And if you run Jellyfin as system service, you may also need to change Jellyfin service's
Log On Asaccount to your specific user instead ofNT Authority\NetworkService. To do that, you can run CMD (may or may not as Administrator) and run this:Now you can see NSSM service editor user interface, go to
Log Onand change the user to your specific user. By the way, here I used default path, if you got any error you can find your nssm location by yourself.Then, press
WINand typeservices(or any other way) to go Windows Services pannel, findJellyfin Serverand restart it, after that, your Jellyfin should run as your specific user.And now, create a symbol link to local folder, here's an example:
Let's say if our username is
bob, and our SMB server is working on192.0.2.1, and we have some media files on it like\\192.0.2.1\bob\media, now if we wanna access it directly fromD:\Media, we can do this:Or, we can directly access our whole SMB server like:
Choose one way you like it :)
Finally, now we can go Jellyfin dashboard to add these local symbol folder, that's exactly the same as adding a real local folder.
Just my personal way to fix this, hope this can help others.