Jump to content

Linux permissions. Still doing something wrong. Still don't know what.


Recommended Posts

Learning_Curve
Posted

This is a follow up to a previous thread i made, which seemed solved at the time, but the solution didn't survive a reboot for whatever reason.

To recap, plus the current state of affairs:

  • Created user/group emby:emby; uid=1005,gid=1005
  • Multiple internal HDDs. In this case, two for Movies and two for TV shows. Four total.
  • Each HDD titled something obvious - Movies, Movies2, TV, TV2, and mounted to a corresponding location.
  • Each mounted via fstab to a permanent home in /emby
  • This folder, all subfolders, all future subfolders, and all files & future files owned by emby:emby with full rwx permission.
  • Other users/groups also given access via setfacl command, and by adding them to the emby group.
  • Emby can access the folders. Can scan them. Can build a library out of it all. But it absolutely will not, no matter what I do, delete a file if I so choose, always citing lack of write access to the media folder (picture).
  • Interestingly, I have sickchill running as a service, and it is able to freely read/write/remove/replace files as a member of its group.
  • Ditto for my normal user account.

Terminal output:
 

$ id emby
uid=1005(emby) gid=1005(emby) groups=1005(emby),984(users),1004(media)
$ id sickchill
uid=959(sickchill) gid=959(sickchill) groups=959(sickchill),1004(media),1005(emby)
$ ps aux | grep emby
emby       89410 10.7  2.0 5278848 339104 ?      Ssl  12:10   0:19 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
$ stat -c "%u %g" /proc/$pid/89410                                                                                                 
1005 1005
$ pwd
/emby/Videos
$ ls -la
total 148
drwxrwsrwx+   6 emby emby  4096 Nov 27 15:52 .
drwxrwsrwx+   3 emby emby  4096 Nov 27 12:24 ..
drwxrwsrwx+ 917 emby emby 73728 Dec  4 11:41 Movies
drwxrwsrwx+ 349 emby emby 36864 Nov 18 13:34 Movies2
drwxrwsrwx+  49 emby emby  4096 Nov 17 06:44 TV
drwxrwsrwx+  38 emby emby  4096 Nov 27 03:28 TV2
$  getfacl .
# file: .
# owner: emby
# group: emby
# flags: -s-
user::rwx
user:sickchill:rwx
user:zero:rwx
group::rwx
group:sickchill:rwx
group:zero:rwx
group:media:rwx
group:emby:rwx
mask::rwx
other::rwx
default:user::rwx
default:user:emby:rwx
default:group::rwx
default:mask::rwx
default:other::rwx

Anybody in the whole wide world should be able to waltz right into that folder and do as they please.

Relevant section of embyserver.txt (with specific filename for this instance redacted):
 

2022-12-04 12:32:06.535 Info App: Removing item from database, Type: Movie, Name: NAME_OF_MOVIE, Path: /emby/Videos/Movies/NAME_OF_MOVIE/NAME_OF_MOVIE.mp4, Id: 142573
2022-12-04 12:32:06.535 Info App: Deleting directory /emby/Videos/Movies/NAME_OF_MOVIE
2022-12-04 12:32:06.538 Error Server: Error processing request
     *** Error Report ***
     Version: 4.7.9.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 5.15.78-1-MANJARO (builduser@fv-az296-38) (gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.39.0) #1 SMP PREEMPT Thu Nov 10 20:50:09 UTC 2022
     Framework: .NET 6.0.11
     OS/Process: x64/x64
     Runtime: usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.11/System.Private.CoreLib.dll
     Processor count: 6
     Data path: /var/lib/emby
     Application path: /usr/lib/emby-server
     System.IO.IOException: System.IO.IOException: Access to the path '/emby/Videos/Movies/NAME_OF_MOVIE' is denied.
     at System.IO.FileSystem.RemoveDirectoryInternal(DirectoryInfo directory, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound)
     at System.IO.FileSystem.RemoveDirectory(String fullPath, Boolean recursive)
     at System.IO.Directory.Delete(String path, Boolean recursive)
     at Emby.Server.Implementations.IO.ManagedFileSystem.DeleteDirectoryInternal(String path, Boolean recursive, Boolean sendToRecycleBin)
     at Emby.Server.Implementations.IO.ManagedFileSystem.DeleteDirectory(String path, Boolean recursive, Boolean sendToRecycleBin)
     at Emby.Server.Implementations.Library.LibraryManager.DeleteItem(BaseItem item, DeleteOptions options, BaseItem parent, Boolean notifyParentItem)
     at Emby.Server.Implementations.Library.LibraryManager.DeleteItem(BaseItem item, DeleteOptions options, Boolean notifyParentItem) 
     at Emby.Api.Library.LibraryService.Any(DeleteItems request)
     at Emby.Api.Library.LibraryService.Any(DeleteItem request) at Emby.Server.Implementations.Services.ServiceController.<>c__DisplayClass6_0.<VoidActionDelegate>b__0(Object service, Object request)
     at Emby.Server.Implementations.Services.ServiceController.Execute(HttpListenerHost appHost, Object requestDto, IRequest req)
     at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, 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 RemoveDirectoryInternal(System.IO.DirectoryInfo, Boolean, Boolean)

Relevant fstab:

/dev/disk/by-uuid/76d31525-0484-4678-a193-7846fa49eb8c /emby/Videos/TV ext4 auto,user,rw,sync,uid=1005,gid=1005 0 0
/dev/disk/by-uuid/900dfc5d-63cf-4ca7-bd9c-7108e23013b1 /emby/Videos/Movies2 ext4 auto,user,rw,sync,uid=1005,gid=1005 0 0
/dev/disk/by-uuid/1755aee9-6201-4627-a343-b293c7ce51e8 /emby/Videos/TV2 ext4 auto,user,rw,sync,uid=1005,gid=1005 0 0
/dev/disk/by-uuid/99734e42-5010-4603-b559-5cb414df920f /emby/Videos/Movies ext4 auto,user,rw,sync,uid=1005,gid=1005 0 0

The only thing I can think of as a possibility is that all these HDD mounts are also NFS exports, and bound to corresponding locations in /srv/nfs. But emby:emby also owns those and the facl is identical to what's posted above.

Can somebody tell me what I'm doing wrong here? I just want to be able to delete something if I don't like it without having to SSH and/or RDP into the computer this is all running on.

Screenshot from 2022-12-04 12-32-23.png

Posted

Run both ls -la and getfacl for /emby/Videos/Movies/NAME_OF_MOVIE and also for the files in the same directory and post the output.

 

Learning_Curve
Posted (edited)
$ ls -la
total 2243688
drwxrwsrwx+   3 emby emby       4096 Nov  9 10:04 .
drwxrwsrwx+ 917 emby emby      73728 Dec  4 11:41 ..
-rwxrwxrwx+   1 emby emby 2297434408 Nov  9 10:04 NAME_OF_MOVIE.mp4
drwxrwsrwx+   2 emby emby       4096 Nov  9 10:04 Subs

$ getfacl .
# file: .
# owner: emby
# group: emby
# flags: -s-
user::rwx
user:sickchill:rwx
user:zero:rwx
group::rwx
group:sickchill:rwx
group:zero:rwx
group:media:rwx
group:emby:rwx
mask::rwx
other::rwx
default:user::rwx
default:user:emby:rwx
default:group::rwx
default:group:emby:rwx
default:mask::rwx
default:other::rwx

$ getfacl NAME_OF_MOVIE.mp4
# file: NAME_OF_MOVIE.mp4
# owner: emby
# group: emby
user::rwx
user:sickchill:rwx
user:zero:rwx
group::rw-
group:sickchill:rwx
group:zero:rwx
group:media:rwx
group:emby:rwx
mask::rwx
other::rwx

 

Edited by Learning_Curve
Posted

I don't see anything wrong with the permissions or ACLs. The thing that stands out to me are the mount options. I don't see a conflict there either but it also shouldn't be necessary to use them. On your system, with the permissions and ACLs as they are you could be using 'defaults' and no 'uid'/'gid' in the fstab. Then there's 'sync' forcing synchronous (blocking) I/O which is typically slower, more so on HDDs. ext4 is a robust journaling FS very resistant to data loss and corruption. Applications needing synchronous or direct I/O normally implement that in their code.

Unless there is some weird conflict between the mount options, the ACLs and SGID I would expect this to work. If you arrived at the current state incrementally - as in started with ownership/permissions, then SUID, then mount options then ACLs it's possible something happened along the way.

If it were my system I would wipe ACLs, sweep to remove SGID, change mount options to defaults, redo ownership and redo ACLs. Maybe on one of the volumes, one consistently getting errors to see if it makes a difference. I wouldn't push anyone to do this, it's just what I would try.

 

Posted

Another thing. If you are on Manjaro there might be some Archisms to consider. Might want to check those first.

 

Learning_Curve
Posted
4 minutes ago, Q-Droid said:

If it were my system I would

That's how I got where I'm at now. This is my fresh take after a week or so of mulling it over. Plus, I'm fighting doing it again, as it takes about 3hrs to scan my libraries, and then more to correct the 150-200 or so that always get misidentified, plus more time to sync everything to the raspberry pis I have running all over the place when all that's in order. 1300+ movies and 80-something shows.

I didn't know that about sync, though, so I'll definitely make that change. I do know that running 'defaults' means 'rw,suid,dev,exec,auto,nouser,async', and also means root does it at boot up. Mostly, I added 'user' as a convenience, since when root mounts it, root owns it. (Or maybe it's just whoever mounts it owns it.) Not only was it complicating my NFS exports, but I assumed (at the time I made the changes) that it was why emby couldn't write/delete things in the folders - which is why I ended up adding user and uid/gid to fstab.

Honestly, this is about three or four weeks now of me fooling around with this, so it's any number of half-baked ideas on top of a few 3/4 baked ideas at this point. But one thing is true: The default install guide doesn't completely work, and there's a primer post on Linux permissions floating around here that I keep finding and being referenced to, but I think I'm past all that.

I was planning on trying my hand at Manjaro/Arch forums, since it does seem to be

13 minutes ago, Q-Droid said:

some Archisms to consider

But wanted to try here one more time, since I know plenty of replies are going to tell me to come here.

Posted

I don't think changing ownership, permissions, etc. without altering the paths would need a rescan of your media. Might have to keep Emby down for the duration so that it doesn't try to access the libraries and mark them gone.

Yeah, I get it. When the typical Linux approach to file/directory access is taken care of it should work. On paper what you have should work. That's why I mentioned the Archisms. The sandboxing and other things in Arch add layers to the problem.

 

 

Learning_Curve
Posted
14 minutes ago, Q-Droid said:

extending the service unit

I actually did do that as one of my first tries a couple weeks back.

Notice in my OP:

17 hours ago, Learning_Curve said:
$ id emby
uid=1005(emby) gid=1005(emby) groups=1005(emby),984(users),1004(media)

Same for Sickchill. I figured that was the perfect solution to having emby own/read/write everything but still let Sickchill copy/move/rename files as needed.

I've since abandoned the media group idea, added Sickchill to the emby group, and it works as expected. Go figure.

But I did just now walk back through that list of commands, replacing 'media' with 'emby', and /mnt/media with my new locations, and now I can delete files from within emby. So, problem solved for now.

But! This is where I made it to last time , and it didn't survive a reboot.

Have to leave for work soon, but will post back tonight if I get time to reboot and see if it holds.

Posted

Have you verified that the log files are indeed owned by emby:emby and not some arbitrary UID:GID (DynamicUser enabled)?

The ReadWritePaths option is service level which should apply to all users and groups associated with the server runtime process.

 

 

  • 2 weeks later...
Learning_Curve
Posted

  

On 12/5/2022 at 7:43 AM, Q-Droid said:

Have you verified that the log files are indeed owned by emby:emby and not some arbitrary UID:GID (DynamicUser enabled)?

How interesting that you would mention this! I now seem to find myself in this exact situation. While I can add/delete from all my media folders at will, I've lost the ability to change them when they've been misidentified. (Which happens on Linux way more than on Windows, for whatever reason.)

One recent example is the movie Exodus (2021). It's been identified as African Exodus (2021), which it definitely isn't. When I use the Identify dialog, I go through the process, enter the imdb/moviedb ID, select the given thumbnail and choose to 'replace all images,' and the thumbnail/artwork/cast/metadata just drops back to what it already was - the wrong movie.
The relevant segment of the log reads as such:

2022-12-13 16:50:36.062 Info HttpClient: POST https://api4.thetvdb.com/v4/login
2022-12-13 16:50:37.037 Info HttpClient: GET https://api4.thetvdb.com/v4/search?type=movie&q=tt7740204&remote_id=tt7740204
2022-12-13 16:50:37.418 Info HttpClient: GET https://api.themoviedb.org/3/find/tt7740204?api_key=x_secret1_x&external_source=imdb_id
2022-12-13 16:50:37.745 Info HttpClient: GET https://api.themoviedb.org/3/configuration?api_key=x_secret1_x
2022-12-13 16:50:37.800 Info App: MovieDb settings: {"images":{"base_url":"http://image.tmdb.org/t/p/","secure_base_url":"https://image.tmdb.org/t/p/","backdrop_sizes":["w300","w780","w1280","original"],"logo_sizes":["w45","w92","w154","w185","w300","w500","original"],"poster_sizes":["w92","w154","w185","w342","w500","w780","original"],"profile_sizes":["w45","w185","h632","original"],"still_sizes":["w92","w185","w300","original"]},"change_keys":["adult","air_date","also_known_as","alternative_titles","biography","birthday","budget","cast","certifications","character_names","created_by","crew","deathday","episode","episode_number","episode_run_time","freebase_id","freebase_mid","general","genres","guest_stars","homepage","images","imdb_id","languages","name","network","origin_country","original_name","original_title","overview","parts","place_of_birth","plot_keywords","production_code","production_companies","production_countries","releases","revenue","runtime","season","season_number","season_regular","spoken_languages","status","tagline","title","translations","tvdb_id","tvrage_id","type","video","videos"]}
2022-12-13 16:50:37.818 Info HttpClient: GET https://private.omdbapi.com?apikey=x_secret2_x&plot=full&r=json&i=tt7740204
2022-12-13 16:50:38.237 Info Server: http/1.1 Response 200 to host3. Time: 2232ms. http://192.168.88.254:8096/emby/Items/RemoteSearch/Movie?X-Emby-Client=Emby Web&X-Emby-Device-Name=Firefox&X-Emby-Device-Id=819e2961-1a29-4c36-a4ff-c26dd7a678fa&X-Emby-Client-Version=4.7.9.0&reqformat=json
2022-12-13 16:50:40.150 Info Server: http/1.1 POST http://192.168.88.254:8096/emby/Items/RemoteSearch/Apply/142859?ReplaceAllImages=true&X-Emby-Client=Emby Web&X-Emby-Device-Name=Firefox&X-Emby-Device-Id=819e2961-1a29-4c36-a4ff-c26dd7a678fa&X-Emby-Client-Version=4.7.9.0&reqformat=json. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:107.0) Gecko/20100101 Firefox/107.0
2022-12-13 16:50:40.168 Info App: Setting provider id's to item 142859-African Exodus: {"Tmdb":"797444"}
2022-12-13 16:50:40.294 Info MediaProbeManager: ProcessRun 'ffprobe' Execute: /usr/bin/ffprobe-emby -i file:"/emby/Videos/Movies/[NAME REDACTED]/[NAME REDACTED].mp4" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data
2022-12-13 16:50:40.573 Info MediaProbeManager: ProcessRun 'ffprobe' Process exited with code 0 - Succeeded
2022-12-13 16:50:40.761 Info HttpClient: GET https://api4.thetvdb.com/v4/search?type=movie&q=797444&remote_id=797444
2022-12-13 16:50:41.038 Info HttpClient: GET https://api4.thetvdb.com/v4/search?type=movie&q=Exodus&year=2021
2022-12-13 16:50:42.323 Info Server: http/1.1 Response 204 to host3. Time: 2173ms. http://192.168.88.254:8096/emby/Items/RemoteSearch/Apply/142859?ReplaceAllImages=true&X-Emby-Client=Emby Web&X-Emby-Device-Name=Firefox&X-Emby-Device-Id=819e2961-1a29-4c36-a4ff-c26dd7a678fa&X-Emby-Client-Version=4.7.9.0&reqformat=json
2022-12-13 16:50:42.579 Info HttpClient: GET https://artworks.thetvdb.com/banners/movies/291715/posters/oBkf22quOzXpMojJZSeL9ImVqE7.jpg
2022-12-13 16:51:01.972 Debug NetworkManager: Detected local ip addresses: 192.168.88.254, fe80::9348:772b:3eb4:6df3%2, 127.0.0.1, 10.17.240.100, ::1
Going through the log, there's a few other error/warning messages. For example:
2022-12-13 16:45:12.240 Error HttpClient: Error getting response from https://www.mb3admin.com/admin/service/EmbyPackages.json
	*** Error Report ***
	Version: 4.7.9.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 5.15.78-1-MANJARO (builduser@fv-az296-38) (gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.39.0) #1 SMP PREEMPT Thu Nov 10 20:50:09 UTC 2022
	Framework: .NET 6.0.11
	OS/Process: x64/x64
	Runtime: usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.11/System.Private.CoreLib.dll
	Processor count: 6
	Data path: /var/lib/emby
	Application path: /usr/lib/emby-server
	System.Net.Http.HttpRequestException: System.Net.Http.HttpRequestException: Resource temporarily unavailable (www.mb3admin.com:443)
	 ---> System.Net.Sockets.SocketException (11): Resource temporarily unavailable
	   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
	   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
	   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
	   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
	   --- End of inner exception stack trace ---
	   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
	   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
	   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
	   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
	   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
	   at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
	   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
	   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
	   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
	   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
	Source: System.Net.Http
	TargetSite: Void MoveNext()
	InnerException: System.Net.Sockets.SocketException: Resource temporarily unavailable
	Source: System.Net.Sockets
	TargetSite: Void ThrowException(System.Net.Sockets.SocketError, System.Threading.CancellationToken)
	   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
	   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
	   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
	   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)

as well as:

2022-12-13 16:45:12.250 Error App: Error getting available plugin updates
	*** Error Report ***
	Version: 4.7.9.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 5.15.78-1-MANJARO (builduser@fv-az296-38) (gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.39.0) #1 SMP PREEMPT Thu Nov 10 20:50:09 UTC 2022
	Framework: .NET 6.0.11
	OS/Process: x64/x64
	Runtime: usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.11/System.Private.CoreLib.dll
	Processor count: 6
	Data path: /var/lib/emby
	Application path: /usr/lib/emby-server
	System.Net.Http.HttpRequestException: System.Net.Http.HttpRequestException: Resource temporarily unavailable (www.mb3admin.com:443)
	 ---> System.Net.Sockets.SocketException (11): Resource temporarily unavailable
	   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
	   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
	   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
	   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
	   --- End of inner exception stack trace ---
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
	   at Emby.Server.Implementations.Updates.InstallationManager.GetAvailablePackagesWithoutRegistrationInfo(Boolean enableCache, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.Updates.InstallationManager.GetAvailablePluginUpdates(Version applicationVersion, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.ScheduledTasks.PluginUpdateTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
	Source: System.Net.Http
	TargetSite: Void MoveNext()
	InnerException: System.Net.Sockets.SocketException: Resource temporarily unavailable
	Source: System.Net.Sockets
	TargetSite: Void ThrowException(System.Net.Sockets.SocketError, System.Threading.CancellationToken)
	   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
	   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
	   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
	   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)

I do see at the top of the log, the usual baseline info:

2022-12-13 16:45:05.697 Info Main: Application path: /usr/lib/emby-server/EmbyServer.dll
2022-12-13 16:45:06.102 Info Main: Emby
	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 5.15.78-1-MANJARO (builduser@fv-az296-38) (gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.39.0) #1 SMP PREEMPT Thu Nov 10 20:50:09 UTC 2022
	Framework: .NET 6.0.11
	OS/Process: x64/x64
	Runtime: usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.11/System.Private.CoreLib.dll
	Processor count: 6
	Data path: /var/lib/emby
	Application path: /usr/lib/emby-server
2022-12-13 16:45:06.102 Info Main: Logs path: /var/lib/emby/logs
2022-12-13 16:45:06.102 Info Main: Cache path: /var/lib/emby/cache
2022-12-13 16:45:06.102 Info Main: Internal metadata path: /var/lib/emby/metadata
2022-12-13 16:45:06.102 Info Main: Transcoding temporary files path: /var/lib/emby/transcoding-temp
Subsequent investigation shows:
$ ls -la | grep emby                                                                                                 
lrwxrwxrwx  1 root         root           12 Nov  8 17:00 emby -> private/emby

which, of course, leads to

# cd private
# ls -la
total 12
drwx------  3 root root 4096 Dec 13 15:58 .
drwxr-xr-x 44 root root 4096 Dec 13 00:00 ..
drwxr-xr-x 10 emby emby 4096 Nov  9 10:53 emby

(Notice I had to change to su just to cd into the folder.)

Now, while the emby link to/var/lib/private/emby is shown to be owned by root, the acl reads different:

$ sudo getfacl emby
# file: emby
# owner: emby
# group: emby
user::rwx
group::r-x
other::r-x

So that translates to, what? Octal 755? Should it be 775? It's owned by emby:emby, but it's nested in folders owned by root:root - which shouldn't be a problem as long as the acl is right. Right?

I have no idea how this happened. It seems totally unrelated to anything I was messing with, and while I was having the original unable to delete issue, I was still able to identify media as needed.

Also worth noting is that, while I do have a Collections segment for my movies w/sequels, and it has artwork that I would expect, it's totally empty and the boxset addon is unable to populate it. Probably related to this, I'm sure.

Posted

Probably should eliminate a few things so you can focus on the actual problems.

- The outbound connection failure to www.mb3admin.com could be that it really was unavailable, overloaded or some other network related issue. Not likely related to your other problems.

- The getfacl on the symlink is returning the data from the referenced location, not the link itself. I don't see ACLs in your listings and the getfacl output looks like standard unix permissions, not extended. Looks okay to me.

I'm assuming that everything under private/emby has correct ownership and permissions. The config, data, logs, cache, metadata, etc?

I don't know what to say about your movie example. It almost looks as if it tried by ID then fell back to name but fetched the wrong one. Is the TVDB set above TMDB or OMDB for your library? 

I don't see anything here pointing to access anymore. You could try changing the order for the metadata downloaders in your movie library. I've disabled TVDB in my movie libs and it's at the bottom of my TV libs. Test changing the metadata and images for another item or the same one after you change the order.

 

Posted

If you're still having problems after trying what I posted can you restart Emby, try those again and attach the latest full server log?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...