See Ash Code logo See Ash Code

A bind mount was only half of my media-permissions problem

Ashlynn Antrobus
• • 3 min read

Getting Jellyfin through the proxy didn’t give it access to my media files.

The directories existed on the host, but /media appeared empty inside the container. While working through that, I also had Jellyfin restarting with an UnauthorizedAccessException when it tried to write under /config/log.

There were several places to get permissions wrong. Changing ownership of a directory addressed only one of them.

A dragon carries media files from a server toward a container, but a locked gate blocks the bridge.

Start with both sides of the mount

In the proxy problem, the important distinction was where Caddy and Jellyfin ran. For storage, I needed to make the same distinction between a host path and the path the application opened inside its container.

The early setup had these questions to answer:

Container locationWhat I needed to check
/mediaWhich host directory supplies it, and can Jellyfin traverse and read it?
/configWhere does configuration persist, and can the application write there?
/config/logDoes the effective log path have a writable mount and permissions?

A directory existing on Ubuntu doesn’t show that the intended directory is mounted at the intended container path. After checking the mount, I still need to check access using the identity of the process that opens it.

Names are local; access uses identities

One arrangement used nasuser as the owner of /media, a dedicated non-login jellyfin account, and a shared mediagroup group. That described the access I wanted on the host.

But putting user: jellyfin:mediagroup in Compose asks the container runtime to resolve those names in the container’s account information. Creating those names on Ubuntu alone doesn’t ensure that the image knows them.

I needed to compare the numeric user and group identities and the permissions on the mounted files. Seeing the same friendly account name in two places wasn’t enough.

I also didn’t want a recursive ownership change across unrelated directories just to make one application stop complaining. Targeted ACLs let me grant the human and service accounts the access they needed while preserving the ownership arrangement.

The path in the exception mattered

Moving logs outside the container sounded like it should address the write failure. It still had to agree with the path Jellyfin was using: /config/log.

A writable directory elsewhere doesn’t help a process that opens a different path. The mount destination, effective process identity, and access rights all have to describe the same operation.

I corrected the mount and permission arrangement for the configuration-log failure. The troubleshooting stopped there, so I treated the repair as successful; I don’t have a recorded fresh check of the log path. The media setup also needed its mount and access rules to agree before Jellyfin could use the files.

This is where the October setup ended up: explicit persistence for the application data and targeted permissions for the accounts using it. The repair didn’t require handing Jellyfin ownership of every directory around the media.

AA

Written by Ashlynn Antrobus

Software developer, author, and builder. Sharing technical lessons learned from building tools like Ebook2Text, IndexedDict, and rag-mcp, and navigating life as a programmer with dyslexia.