Jump to content

Permissions look right, but Emby says it can't write to directory


JoeAverage
Go to solution Solved by JoeAverage,

Recommended Posts

JoeAverage

The permissions look right for the temp directory below, but when I tell Emby to use it as its server cache path it says, "Emby Server requires write access to this folder. Please ensure write access and try again."

drwxrwsr-x   2 emby media  4096 Jun 11 07:48 temp

The Emby service runs with user emby and group media, so I'm puzzled as to why Emby can't write to the temp directory.

emby-server.service:

[Unit]
Description=Emby brings together your videos, music, photos, and live television
.
After=network.target

[Service]
User=emby
Group=media
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



 

Edited by JoeAverage
Link to comment
Share on other sites

JoeAverage

Solved:

The problem stemmed from the systemd emby-server.service process specifying a dynamic 'emby' user and the media_files directory being under /home, since dynamic users have read-only access to anything under /home.

The solution is to either switch to a regular (non-dynamic) user, or move the files to a directory that isn't read-only for dynamic users.

 

 

Link to comment
Share on other sites

  • Solution
JoeAverage

Further to the solution, should anyone have the same issue:

I ended up moving away from the dynamic user to get rid of the read-only issue.

I shut down emby-server and used sudo systemctl edit emby-server.service to add the following in the space provided, which will override the default settings:

[Service]
DynamicUser=false

I then used the normal process for adding a user account named 'emby' that is in the 'media' group.

Next I made everything under my media directory chown emby:media and also chmod 775.

Finally I used sudo systemctl start emby-server.service to restart the service.

It came up, and was able to write to the media directory and everything under it (for .bif files and the like).

Edited by JoeAverage
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

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...