kendoman96 1 Posted May 26, 2020 Posted May 26, 2020 (edited) Alright so recently I had a crash because my OS SSD filled up. I run a 60gb SSD (which ive been meaning to upgrade) and I have always had emby store metadata and pictures and such within the media file locations. I also offload the transcoding temp location because at any given day its floating ~15-20gb of usage. I noticed the drive had 16gb of transcoding files for some reason. Reviewing my settings I tried to set my transcoding temp location and it throws the below error: "Emby Server requires write access to this folder. Please ensure write access and try again." System specs: Supermicro X8DTL 2x Intel Xeon E5645 24gb DDR3 ECC Reg mem 4x 6TB seagate Iron Wolf 60gb SSD Arch 5.6.6-arch1-1 Emby 4.4.2.0 I run a pretty simple drive setup, with all the drives mounted in /storage/ with their SD$ name as the mount point: Emby owns the storage directory, and all of the subsequent mount points and drives.I usually run a chmod 777 -R * and a chown emby:emby -R * I have always done this since the olden days of media browser (og user woot woot!) as I've found it prevents any issues with emby downloading metadata and subtitles etc / drwxrwxrwx+ 11 emby emby 4096 Sep 6 2019 storage /storage/ drwxrwxrwx+ 11 emby emby 4096 Sep 6 2019 . drwxr-xr-x 20 root root 4096 Jan 25 15:53 .. drwxrwxrwx 7 emby emby 4096 Apr 12 08:28 sda drwxrwxrwx 4 emby emby 4096 Mar 21 13:46 sdb drwxrwxrwx+ 2 emby emby 4096 Feb 19 2019 sdc drwxrwxrwx 6 emby emby 4096 May 23 13:57 sdd drwxrwxrwx+ 2 emby emby 4096 Feb 19 2019 sde drwxrwxrwx 4 emby emby 4096 Jun 7 2019 sdf drwxrwxrwx+ 2 emby emby 4096 Feb 19 2019 sdg drwxrwxrwx+ 2 emby emby 4096 Feb 19 2019 sdh drwxrwxrwx+ 3 emby emby 4096 May 1 2019 sdi /storage/sda/ drwxrwxrwx 7 emby emby 4096 Apr 12 08:28 . drwxrwxrwx+ 11 emby emby 4096 Sep 6 2019 .. drwxrwxrwx 1131 emby emby 192512 May 11 07:31 Movies drwxrwxrwx 147 emby emby 12288 Mar 15 18:42 TV drwxrwxrwx 3 emby emby 4096 Apr 19 03:00 backups drwxrwxrwx 2 emby emby 4096 Apr 12 08:28 metadata drwxrwxrwx 2 emby emby 6045696 Apr 22 07:24 transcoding-temp It appears that new metadata is not saving to media folders despite the checked options (see screenshot) Also a screenshot of the error has been added. It doesnt seem to matter where I set the storage to, if it be one of the 6tb drives or even a local directory, although it will let me put the transcoding temp as the folder above the default location (/var/lib/private/emby/transcoding-temp) Also I dont think there is an issue with the ACL for storage getfacl storage/ # file: storage/ # owner: emby # group: emby user::rwx group::rwx #effective:r-x group:emby:rwx #effective:r-x mask::r-x other::r-x default:user::rwx default:group::rwx default:group:emby:rwx default:mask::rwx default:other::rwx I'm sure if I got drunk and gave it a good 2 or 3 hours I could figure it out but I have zero free time right now. Any help would be very appreciated!!!+Edit 1, codeblocks seem to have failed Edited May 26, 2020 by kendoman96
kendoman96 1 Posted May 26, 2020 Author Posted May 26, 2020 Tried to fix codeblocks, seem to not be working. Apologies.
Luke 40065 Posted May 27, 2020 Posted May 27, 2020 Hi there, have you looked at our file permissions guide: https://emby.media/community/index.php?/topic/32218-file-permissions-guide-for-new-linux-users/ This may have some helpful info on configuring folder permissions. 1
kendoman96 1 Posted June 1, 2020 Author Posted June 1, 2020 Hey Luke, I have perused the file permissions guide with no luck. I'm usually pretty good with permissions issues but I just cannot seem to get this. I mean it says all of the drives and their contents are owned by emby, and they have Read Write and Execute permissions. I'm curious as this issue only happened when I upgraded emby, perhaps a downgrade is in order.
mastrmind11 722 Posted June 1, 2020 Posted June 1, 2020 make sure emby is still running as emby after the upgrade. I seem to recall something popping up on here a few days ago like this. 1
kendoman96 1 Posted June 1, 2020 Author Posted June 1, 2020 I guess this is what is confusing me the most right now. this folder is the default directory for transcoding-temp: /var/lib/private/emby These are the permissions for that folder: getfacl transcoding-temp/ # file: transcoding-temp/ # owner: emby # group: emby user::rwx group::r-x other::r-x ================= ls -la total 344 drwxr-xr-x 15 emby emby 4096 May 26 17:10 . drwx------ 4 root root 4096 Apr 22 07:46 .. drwxr-xr-x 3 emby emby 4096 Jul 28 2018 .dotnet drwxr-xr-x 16 emby emby 4096 May 29 04:12 cache drwxr-xr-x 4 emby emby 4096 Nov 11 2019 config drwxr-xr-x 8 emby emby 4096 Jun 1 09:50 data drwxr-xr-x 2 emby emby 4096 Jun 28 2018 fonts drwxr-xr-x 2 emby emby 4096 Dec 4 2017 localization drwxr-xr-x 2 emby emby 159744 Jun 1 09:31 logs drwxr-xr-x 9 emby emby 4096 May 3 2019 metadata drwxr-xr-x 3 emby emby 4096 May 11 08:04 plugins drwxr-xr-x 2 emby emby 4096 Dec 6 00:00 'plugins\\Statistics' drwxr-xr-x 3 emby emby 4096 Dec 4 2017 root drwxr-xr-x 3 emby emby 4096 Mar 16 14:52 sync drwxr-xr-x 2 emby emby 131072 Jun 1 09:48 transcoding-tempI have cloned these permissions to this directory:/storage getfacl /storage getfacl: Removing leading '/' from absolute path names # file: storage # owner: emby # group: emby user::rwx group::r-x other::r-x ls -la / total 80 drwxr-xr-x 20 root root 4096 Jun 1 08:49 . drwxr-xr-x 20 root root 4096 Jun 1 08:49 .. lrwxrwxrwx 1 root root 7 May 19 18:42 bin -> usr/bin drwxr-xr-x 3 root root 4096 Jun 1 08:54 boot drwxr-xr-x 3 root root 4096 Jun 1 2018 boot.bak drwxr-xr-x 20 root root 3440 May 26 16:58 dev drwxr-xr-x 55 root root 4096 Jun 1 09:25 etc drwxr-xr-x+ 3 root root 4096 Dec 4 2017 home lrwxrwxrwx 1 root root 7 May 19 18:42 lib -> usr/lib lrwxrwxrwx 1 root root 7 May 19 18:42 lib64 -> usr/lib drwx------ 2 root root 16384 Dec 4 2017 lost+found drwxr-xr-x 3 root root 4096 Jun 24 2019 luna_ssl drwxr-xr-x 2 root root 4096 Mar 26 2017 mnt drwxr-xr-x 2 root root 4096 Jan 24 08:02 opt -rwxr-xr-x 1 root root 77 Apr 3 2019 permissions.sh dr-xr-xr-x 381 root root 0 May 26 16:09 proc drwxr-x--- 5 root root 4096 May 26 17:21 root drwxr-xr-x 21 root root 620 Jun 1 08:53 run lrwxrwxrwx 1 root root 7 May 19 18:42 sbin -> usr/bin -rwxr-xr-x 1 root root 383 Jan 25 19:36 speedtest.sh drwxr-xr-x 4 root root 4096 Dec 4 2017 srv drwxr-xr-x 6 emby emby 4096 Jun 1 09:39 storage dr-xr-xr-x 13 root root 0 May 26 16:09 sys drwxrwxrwt 13 root root 260 Jun 1 09:31 tmp drwxr-xr-x 9 root root 4096 Jun 1 09:25 usr drwxr-xr-x 13 root root 4096 Jun 1 08:53 var As far as I can tell, they are identical (and also on the same disk), so what gives?? I was thinking it might have something to do with the ACL, so i just removed it and made it identical to that of the previous directory which works. My only thoughts here might be an issue with dotnet permissions? Is that a thing? systemctl status emby-server * emby-server.service - Emby brings together your videos, music, photos, and live television. Loaded: loaded (/usr/lib/systemd/system/emby-server.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2020-06-01 09:31:40 EDT; 36min ago Main PID: 799470 (dotnet) Tasks: 24 (limit: 28888) Memory: 267.1M CGroup: /system.slice/emby-server.service `-799470 dotnet /usr/lib/emby-server/EmbyServer.dll -programdata /var/lib/emby -ffdetect /usr/bin/ffdetect-emby -ffmpeg /usr/bin/ffmpeg-emby -ffprobe /usr/bin/ffprobe-emby -restartexitcode 3 Jun 01 09:31:45 Luna emby-server[799470]: Info App: Entry point completed: Emby.Notifications.Notifications. Duration: 0.0003969 seconds Jun 01 09:31:45 Luna emby-server[799470]: Info App: Starting entry point Emby.Server.Sync.SyncManagerEntryPoint Jun 01 09:31:45 Luna emby-server[799470]: Info App: SyncRepository Initialize taking write lock Jun 01 09:31:45 Luna emby-server[799470]: Info App: SyncRepository Initialize write lock taken Jun 01 09:31:45 Luna emby-server[799470]: Info App: Entry point completed: Emby.Server.Sync.SyncManagerEntryPoint. Duration: 0.0062672 seconds Jun 01 09:31:45 Luna emby-server[799470]: Info App: Starting entry point Emby.Server.Sync.SyncNotificationEntryPoint Jun 01 09:31:45 Luna emby-server[799470]: Info App: Entry point completed: Emby.Server.Sync.SyncNotificationEntryPoint. Duration: 0.0029324 seconds Jun 01 09:31:45 Luna emby-server[799470]: Info App: Starting entry point EmbyServer.Windows.LoopUtilEntryPoint Jun 01 09:31:45 Luna emby-server[799470]: Info App: Entry point completed: EmbyServer.Windows.LoopUtilEntryPoint. Duration: 0.0003938 seconds Jun 01 09:31:45 Luna emby-server[799470]: Info App: All entry points have started These are the settings for emby in /etc/group:emby:x:422:jon Apologies again codeblocks seem to be non-working. Or perhaps its an ID10T issue.
kendoman96 1 Posted June 1, 2020 Author Posted June 1, 2020 make sure emby is still running as emby after the upgrade. I seem to recall something popping up on here a few days ago like this. It appears it is running as emby: ps -aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND emby 799470 1.2 1.2 5685112 305584 ? Ssl 09:31 0:30 dotnet /usr/lib/emby-server/EmbyServer.dll -programdata /var/lib/emby -ffdetect /usr/bin/ffdetect-emby -ffmpeg /usr/bin/ffmpeg-emby -ffprobe /usr/bin/ffprobe-emby -restar
kendoman96 1 Posted June 5, 2020 Author Posted June 5, 2020 I see "Version 4.4.3.0 is now available for download." on my dashboard so I am hoping when it is finally pushed to arch this might be fixed. Currently waiting as emby-server-4.4.2.0-1 is the only one available.Will report back when released.
Q-Droid 880 Posted June 5, 2020 Posted June 5, 2020 (edited) Arch Linux? Someone posted about systemd and dynamic user as default causing access problems. Can't provide link, posting from phone. Link: https://wiki.archlinux.org/index.php/Emby Edited June 5, 2020 by Q-Droid 1
kendoman96 1 Posted June 5, 2020 Author Posted June 5, 2020 Arch Linux? Someone posted about systemd and dynamic user as default causing access problems. Can't provide link, posting from phone. Link: https://wiki.archlinux.org/index.php/Emby Yo nice find! Unconfirmed if this is working yet but looking in /etc/systemd/system/multi-user.target.wants I saw emby-server.service Checking the default configuration: [unit] Description=Emby brings together your videos, music, photos, and live television. After=network.target [service] User=emby Group=emby SupplementaryGroups=render SupplementaryGroups=video DynamicUser=true StateDirectory=emby ReadWritePaths=/dev/dri EnvironmentFile=/etc/conf.d/emby-server ExecStart=/usr/bin/emby-server RestartForceExitStatus=3 AmbientCapabilities= CapabilityBoundingSet= LockPersonality=true ProtectControlGroups=true ProtectKernelModules=true ProtectKernelTunables=true [install] WantedBy=multi-user.target Commenting out ReadWritePaths=/dev/dri did not work as suggested in thread "https://emby.media/community/index.php?/topic/85900-emby-server-service-wont-start-automatically-anymore/" although I didnt expect it to. Adding: [service] SupplementaryGroups=share ReadWritePaths=/mnt/share did not work as suggested in the very short wiki entry "https://wiki.archlinux.org/index.php/Emby" (speaking of which the default path is not correct, or maybe my system is just funky) However changing ReadWritePaths=/dev/dri to ReadWritePaths=/storage/ now lets me choose a transcoding temp path with no error. Over the next few days I will be testing the write capabilities and if I am correctly saving media to media folders and whatnot. I am hesitant to say that this is solved however the optimist in me wishes it so. Thank you all for the feedback. Will report back after monitoring.
negativzeroe 79 Posted June 5, 2020 Posted June 5, 2020 Side note. Do you run any other services on your arch server? I've been running arch on my laptop for some time and have been thinking about converting my Debian server over. I also run Nextcloud as well as several other services. How do you keep up with updates? Sent from my ONEPLUS A5000 using Tapatalk 1
kendoman96 1 Posted June 6, 2020 Author Posted June 6, 2020 Side note. Do you run any other services on your arch server? I've been running arch on my laptop for some time and have been thinking about converting my Debian server over. I also run Nextcloud as well as several other services. How do you keep up with updates? Sent from my ONEPLUS A5000 using Tapatalk I usually like to split services between different servers, however the services currently running on this server: nrpe sshd snmpd httpd couchpotato emby-server minecraft server (because why not) As far as keeping up with updates its pretty easy. I mean I look for conflicts on upgrades, I try to keep upgrades limited to a handfull of packages per run. If anything breaks I just downgrade the problematic package and add it to the IgnorePkg list. I'm usually pretty good at diagnosing these things but I couldnt find anything in the logs indicating an issue with the systemd configuration. As a standard all my servers run SSH, NRPE, and SNMP as I have an on-site monitoring server with SMS notification system and a bunch of plugins. I also have an off-site monitoring server as a backup. 1
Q-Droid 880 Posted June 6, 2020 Posted June 6, 2020 Normally you don't want to remove the access to /dev/dri as that's the location of the render device used for HW transcoding...if you have a GPU. The ReadWritePaths= and other xxxPaths= options accept a space separated list of values for the paths you want to allow. Another option is you could disable DynamicUser for the emby-server service and it should behave as a normal static user. 1
kendoman96 1 Posted June 7, 2020 Author Posted June 7, 2020 Normally you don't want to remove the access to /dev/dri as that's the location of the render device used for HW transcoding...if you have a GPU. The ReadWritePaths= and other xxxPaths= options accept a space separated list of values for the paths you want to allow. Another option is you could disable DynamicUser for the emby-server service and it should behave as a normal static user. I added /dev/dri back, however this is a headless server with no proper GPU. It has dual 6 core hyperthreaded xeons so it never really has issues transcoding, but good to know you can just space separate them.
Loading 2 Posted April 13 Posted April 13 Did you ever find a solution to this? I am having the exact same issue.
Luke 40065 Posted April 13 Posted April 13 17 minutes ago, Loading said: Did you ever find a solution to this? I am having the exact same issue. Hi, can you please describe your issue in more detail? Emby Server does not require write access.
Loading 2 Posted April 13 Posted April 13 7 minutes ago, Luke said: Hi, can you please describe your issue in more detail? Emby Server does not require write access. I am trying to set up transcoding in RAM on Arch linux and I am getting this error, "Emby Server requires write access to this folder. Please ensure write access and try again." Log FIle 2025-04-12 22:05:01.762 Error Server: Error processing request *** Error Report *** Version: 4.8.11.0 Command line: /usr/lib/emby-server/EmbyServer.dll -programdata /var/lib/emby -ffdetect /usr/bin/ffdetect-emby -ffmpeg /usr/bin/ffmpeg-emby -ffprobe /usr/bin/ffprobe-emby -restartexitcode 3 Operating system: Linux version 6.14.2-2-cachyos (linux-cachyos@cachyos) (clang version 19.1.7, LLD 19.1.7) #1 SMP PREEMPT_DYNAMIC Thu, 10 Apr 2025 17:27:10 +0000 Framework: .NET 6.0.36 OS/Process: x64/x64 Runtime: usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.36/System.Private.CoreLib.dll Processor count: 4 Data path: /var/lib/emby Application path: /usr/lib/emby-server System.IO.IOException: System.IO.IOException: Read-only file system : '/mnt/ramdisk/8829c0f0-5ea1-4b39-8f3a-29034a0198dd' at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize) at System.IO.File.WriteAllTextAsync(String path, String contents, Encoding encoding, CancellationToken cancellationToken) at System.IO.File.WriteAllTextAsync(String path, String contents, CancellationToken cancellationToken) at Emby.Server.Implementations.IO.ManagedFileSystem.WriteAllTextAsync(String path, String text, CancellationToken cancellationToken) at Emby.Api.EnvironmentService.EnsureWriteAccess(String path, CancellationToken cancellationToken) at Emby.Api.EnvironmentService.Post(ValidatePath request) at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task) at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost httpHost, IServerApplicationHost appHost, IRequest httpReq, IResponse httpRes, IStreamHelper streamHelper, RestPath restPath, String responseContentType, CancellationToken cancellationToken) at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken) Source: System.Private.CoreLib TargetSite: Void ThrowExceptionForIoErrno(ErrorInfo, System.String, Boolean, System.Func`2[Interop+ErrorInfo,Interop+ErrorInfo]) The ram disk belongs to Emby user ❯ ls -la /mnt/ drwxrwxrwx - root 12 Apr 21:26 . drwxr-xr-x - root 12 Apr 18:00 .. drwxrwxrwx - emby 12 Apr 22:10 ramdisk
Loading 2 Posted April 13 Posted April 13 40 minutes ago, Loading said: I am trying to set up transcoding in RAM on Arch linux and I am getting this error, "Emby Server requires write access to this folder. Please ensure write access and try again." Log FIle 2025-04-12 22:05:01.762 Error Server: Error processing request *** Error Report *** Version: 4.8.11.0 Command line: /usr/lib/emby-server/EmbyServer.dll -programdata /var/lib/emby -ffdetect /usr/bin/ffdetect-emby -ffmpeg /usr/bin/ffmpeg-emby -ffprobe /usr/bin/ffprobe-emby -restartexitcode 3 Operating system: Linux version 6.14.2-2-cachyos (linux-cachyos@cachyos) (clang version 19.1.7, LLD 19.1.7) #1 SMP PREEMPT_DYNAMIC Thu, 10 Apr 2025 17:27:10 +0000 Framework: .NET 6.0.36 OS/Process: x64/x64 Runtime: usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.36/System.Private.CoreLib.dll Processor count: 4 Data path: /var/lib/emby Application path: /usr/lib/emby-server System.IO.IOException: System.IO.IOException: Read-only file system : '/mnt/ramdisk/8829c0f0-5ea1-4b39-8f3a-29034a0198dd' at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize) at System.IO.File.WriteAllTextAsync(String path, String contents, Encoding encoding, CancellationToken cancellationToken) at System.IO.File.WriteAllTextAsync(String path, String contents, CancellationToken cancellationToken) at Emby.Server.Implementations.IO.ManagedFileSystem.WriteAllTextAsync(String path, String text, CancellationToken cancellationToken) at Emby.Api.EnvironmentService.EnsureWriteAccess(String path, CancellationToken cancellationToken) at Emby.Api.EnvironmentService.Post(ValidatePath request) at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task) at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost httpHost, IServerApplicationHost appHost, IRequest httpReq, IResponse httpRes, IStreamHelper streamHelper, RestPath restPath, String responseContentType, CancellationToken cancellationToken) at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken) Source: System.Private.CoreLib TargetSite: Void ThrowExceptionForIoErrno(ErrorInfo, System.String, Boolean, System.Func`2[Interop+ErrorInfo,Interop+ErrorInfo]) The ram disk belongs to Emby user ❯ ls -la /mnt/ drwxrwxrwx - root 12 Apr 21:26 . drwxr-xr-x - root 12 Apr 18:00 .. drwxrwxrwx - emby 12 Apr 22:10 ramdisk I was able to set the location of transcoding to smb://10.0.0.21/entertainment/media/tmp/transcoding smb://10.0.0.21/entertainment/media/tmp/transcoding which is set up as 777 permissions for testing here. Everything has been set to 777 to troubleshoot permissions and this smb path is the only one I can get to work, all local file paths I could not get to work with Emby showing one of two errors, either "Emby Server requires write access to this folder. Please ensure write access and try again." or "Emby does not have permissions to view this folder" (this one was /var/tmp/ramdisk mount in fstab for the ram disk)
Loading 2 Posted April 13 Posted April 13 Turns out I did not have emby as a user or group on my system. This post also helped me figure this out, 1 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now