Jump to content

Question about my folder permissions


chudak

Recommended Posts

I am trying to set a folder for DVR recordings on cifs share.

Created a folder and it looks like:

 drwxrwsrwx 1 emby  emby     0 Sep  3 09:46 recordings/

(the parent folder is =

drwxrwsrwx 1 emby  emby    440 Sep  3 09:46 Emby_Backups/)

However when I set it I get an error: "Emby Server requires write access to this folder. Please ensure write access and try again."

What am I missing  ?

Thx

Link to comment
Share on other sites

2 minutes ago, Luke said:

Hi there, have you checked out our file permissions guide?

 

I think I did and lots others sources, but obviously something is missing.

By looking at my permissions above, do you what ?

 

Interesting note:  saving a path to those folders for Emby Backup does not complain but setting it or recording does.

Why  ?

 

Link to comment
Share on other sites

It's possible the backup config screen is only checking for read access. That will need to be reviewed. Is it able to create new backups?

Link to comment
Share on other sites

I'm getting the same needs-write-access error when trying to setup a DVR directory.

Just installed, going thru the setup and DVR. Movie library works. These are all local directories.

ls -l /home/emby/Library/
total 8
drwxrwxr-x 2 emby emby 4096 Sep  3 18:39 DVR
drwxrwxr-x 2 emby emby 4096 Sep  3 18:41 Movies

also tried emby:users, and I get the same error.

Any help here is appreciated.

Thanks,

John

 

(Running on Manjaro (Arch derivative) btw. 

Edited by jabster
adding OS; noted everything is local
Link to comment
Share on other sites

Nope. Everything is Linux ext4. Everything involved with this setup is local and, so far, internal, on a single HD.. (I'm going to add USB drives for the movie/tv libraries eventually.)

thanks,

john

Link to comment
Share on other sites

3 minutes ago, jabster said:

Nope. Everything is Linux ext4. Everything involved with this setup is local and, so far, internal, on a single HD.. (I'm going to add USB drives for the movie/tv libraries eventually.)

thanks,

john

Ok well the server is being denied the ability to create a text file within the folder you chose. That's why you're getting that message about write access required.

Link to comment
Share on other sites

Thanks.

At first glance those don't seem relevant, but I'll look at them in more detail over the weekend.

FWIW, I've also tried 777 permissions with no luck.

Might even just try to reboot and see what happens.

Link to comment
Share on other sites

FWIW, /car/lib/emby.../recordings is owned by emby:emby: drwxr-xr-x

There's a symlink between /var/lib/emby and private/emby. Private is owned by root:root. Everything inside private is owned by emby:emby.

And I can't "sudo emby". Is that a problem?

Link to comment
Share on other sites

Q-Droid

Both of you should read the threads linked in by @Luke. If you've already tried the File Permissions Guide then the last two threads he shared will likely have the solution to your problems.

 

Link to comment
Share on other sites

 

I think an interesting observation from the fact that so many people having troubles with emby and file permissions show that this area may need some face lift.

I am not sure what exactly should be done.  But some ways for force folders used by emby to be in a good state from permissions standpoint would be really welcomed, especially assuming that all emby customers have root access ans can allow say emby WebGUI to force permissions changes. 

Wonder if @Luke and dev guys think about this area?

  • Like 1
Link to comment
Share on other sites

mastrmind11
20 hours ago, chudak said:

 

I think an interesting observation from the fact that so many people having troubles with emby and file permissions show that this area may need some face lift.

I am not sure what exactly should be done.  But some ways for force folders used by emby to be in a good state from permissions standpoint would be really welcomed, especially assuming that all emby customers have root access ans can allow say emby WebGUI to force permissions changes. 

Wonder if @Luke and dev guys think about this area?

Not sure how that would be possible.  There's no way for emby to know the owner of shared folders, and forcing ownership to just emby would break the majority of users who actually know what they're doing permission-wise.

  • Like 2
Link to comment
Share on other sites

yeah....i have zero clue about filesystem permissions. 🙄

So it turns out Arch needs some special tweaking. I need to create a directory and file:

/etc/systemd/system/emby-server.service.d/write-permissions.conf

containing not quite what the Arch wiki says:

[Service]
SupplementaryGroups=users
ReadWritePaths= /home/emby/

 

Ownership of /home/emby is still emby:emby.


Restart emby and everything works. No problem setting the DVR directory path.

Didn't have this problem with Plex, so not sure if this is an underlying problem with emby, or if Plex is built differently for Arch, or what. Odd problem to have even tho emby is in the Arch repos and Plex is AUR.

 

Link to comment
Share on other sites

3 hours ago, jabster said:

yeah....i have zero clue about filesystem permissions. 🙄

So it turns out Arch needs some special tweaking. I need to create a directory and file:


/etc/systemd/system/emby-server.service.d/write-permissions.conf

containing not quite what the Arch wiki says:

[Service]
SupplementaryGroups=users
ReadWritePaths= /home/emby/

 

Ownership of /home/emby is still emby:emby.


Restart emby and everything works. No problem setting the DVR directory path.

Didn't have this problem with Plex, so not sure if this is an underlying problem with emby, or if Plex is built differently for Arch, or what. Odd problem to have even tho emby is in the Arch repos and Plex is AUR.

 

What user does that other software run under?

Link to comment
Share on other sites

Plex you mean?

It runs as ujser plex. All directories for plex are owned by plex:plex and I had zero issues with permissions and getting that to work. No special write-permissions file required. It just worked.

Plex doesn't even support Arch, whereas emby does, so it's weird that Plex setup is actually easier and more straight forward. Which harkens back to @chudak 's comment about something under the hood perhaps needing a facelift.

Link to comment
Share on other sites

6 hours ago, jabster said:

Plex you mean?

It runs as ujser plex. All directories for plex are owned by plex:plex and I had zero issues with permissions and getting that to work. No special write-permissions file required. It just worked.

Plex doesn't even support Arch, whereas emby does, so it's weird that Plex setup is actually easier and more straight forward. Which harkens back to @chudak 's comment about something under the hood perhaps needing a facelift.

OK, everything is same for emby, it just runs as user emby.

Link to comment
Share on other sites

Quote

No special write-permissions file required.

Emby doesn't need write permissions either, unless you enable a feature that requires it.

Link to comment
Share on other sites

On 09/09/2020 at 04:31, Luke said:

Emby doesn't need write permissions either, unless you enable a feature that requires it.

That's the thing, if Plex needs to write, as long as the Linux permissions are in order, it can write. No need to create  a config file for the service.

Found this thread after almost uninstalling Emby, cancelling my Premiere and going back to Plex. Seriously, please consider what your users are saying. If there wasn't an issue, this thread wouldn't be here.

  • Like 1
Link to comment
Share on other sites

Q-Droid
3 hours ago, setl said:

That's the thing, if Plex needs to write, as long as the Linux permissions are in order, it can write. No need to create  a config file for the service.

Found this thread after almost uninstalling Emby, cancelling my Premiere and going back to Plex. Seriously, please consider what your users are saying. If there wasn't an issue, this thread wouldn't be here.

What the users have been saying is that they've chosen to run Emby on an OS they don't know. Then they come here for help when they don't understand the requirements and don't want to take the time to learn the tools they've chosen to use. The singular biggest problem reported is permissions for which there are many threads and guides. Linux/UNIX is strict and for good reason. For the vast majority of cases it is a user problem, not Emby.

 

  • Like 2
Link to comment
Share on other sites

1 hour ago, Q-Droid said:

What the users have been saying is that they've chosen to run Emby on an OS they don't know. Then they come here for help when they don't understand the requirements and don't want to take the time to learn the tools they've chosen to use. The singular biggest problem reported is permissions for which there are many threads and guides. Linux/UNIX is strict and for good reason. For the vast majority of cases it is a user problem, not Emby.

 

"The users are stupid." Ok.

Thing is, emby is apparently the ONLY media server with this problem. Plex. Jellyfin..Just change ownership and voila!, everything works. But even with 777 permissions emby still can't write to a directory without some config file hack? (No idea what it's like on other distros.) That File Permissions Guide is useless here, because write access evidently doesn't mean write access to emby on Arch.

If emby is doing things differently, fine, but document it somewhere. emby allegedly supports Arch, but it doesn't seem that way.

I eventually figured out the config file hack from the Arch wiki entry for emby, but even that was "wrong" and I had to use a different group.

It shouldn't be this difficult to choose a different DVR directory.

Link to comment
Share on other sites

Q-Droid
10 minutes ago, jabster said:

"The users are stupid." Ok.

Thing is, emby is apparently the ONLY media server with this problem. Plex. Jellyfin..Just change ownership and voila!, everything works. But even with 777 permissions emby still can't write to a directory without some config file hack? (No idea what it's like on other distros.) That File Permissions Guide is useless here, because write access evidently doesn't mean write access to emby on Arch.

If emby is doing things differently, fine, but document it somewhere. emby allegedly supports Arch, but it doesn't seem that way.

I eventually figured out the config file hack from the Arch wiki entry for emby, but even that was "wrong" and I had to use a different group.

It shouldn't be this difficult to choose a different DVR directory.

Yes, there is room for improvement. The fact that you call the configuration change a hack reinforces my point. 

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