Jump to content

Question about my folder permissions


chudak

Recommended Posts

This is no help:

Nor is a post about ext4 filesystem.

"hack" is easier to type than "custom configuration change because of systemd's filesystem abstraction" every time and because it's evidently different than how every other media server works.

I stand by my comment that emby could stand for some improvement when it comes to permissions.

Link to comment
Share on other sites

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

 

What a disingenuous comment to make. I've been using Linux for thirteen years, back when Dapper Drake was the Ubuntu LTS of choice. I've been using Arch for the past four years.

This need to add custom parameters to a systemd service file instead of using the existing Linux file permissions is not properly documented, not properly hinted at in the application, and only serves to frustrate your users.

That's akin to selling a car, and not telling the buyer there's a handbrake override under the hood that keeps the handbrake on even when you've released the handbrake in the car.

emby.png

Edited by setl
  • Haha 2
  • Thanks 1
Link to comment
Share on other sites

alucryd
16 hours ago, setl said:

This need to add custom parameters to a systemd service file instead of using the existing Linux file permissions is not properly documented, not properly hinted at in the application, and only serves to frustrate your users.

It's been documented ever since DynamicUser has been introduced... https://wiki.archlinux.org/index.php/Emby

Link to comment
Share on other sites

alucryd

And for the record, this has nothing to do with emby itself. Other distros don't use systemd's bells and whistles because they lag behind in terms of version and features. If you want to persist using Arch, you should be able to search the wiki and deal with these things by yourself. A lot of our services are using similar hardening these days.

  • Like 1
Link to comment
Share on other sites

24 minutes ago, alucryd said:

It's been documented ever since DynamicUser has been introduced... https://wiki.archlinux.org/index.php/Emby

If I have the following permissions on my share: 

drwxr-xr-x 2 yuriw root     0 Sep  8 17:32 Videos/

what exactly do I have to do to allow emby to be able to delete videos via GUI ?

(

adding
SupplementaryGroups=root
ReadWritePaths=/media/pi-nas/
Did not work...
)

 

Link to comment
Share on other sites

alucryd
14 minutes ago, chudak said:

If I have the following permissions on my share: 

drwxr-xr-x 2 yuriw root     0 Sep  8 17:32 Videos/

what exactly do I have to do to allow emby to be able to delete videos via GUI ?

(

adding
SupplementaryGroups=root
ReadWritePaths=/media/pi-nas/
Did not work...
)

 

Of course not, you're dealing with groups, it's the second triplet and your directory is not writable for the root group, you need to chmod g+w. Also, adding emby to the root group is not exactly a good idea, please use a dedicated group for your media files.

Link to comment
Share on other sites

1 hour ago, alucryd said:

It's been documented ever since DynamicUser has been introduced... https://wiki.archlinux.org/index.php/Emby

Arch documentation sucks.

Never thought I'd see worse documentation anywhere else, but here we are.

If emby persists in officially supporting Arch, shouldn't YOU be documenting this somewhere?

I don't expect anything from Plex for example because they don't support it. But it works.

Quote

A lot of our services are using similar hardening these days.

Yet I'm pointed to a generic Linux Permissions page...

Regardless, I've uninstalled this.

#Done

Link to comment
Share on other sites

1 hour ago, chudak said:

If I have the following permissions on my share: 

drwxr-xr-x 2 yuriw root     0 Sep  8 17:32 Videos/

what exactly do I have to do to allow emby to be able to delete videos via GUI ?

(

adding
SupplementaryGroups=root
ReadWritePaths=/media/pi-nas/
Did not work...
)

 

@chudak This is what worked for me. So maybe try changing your group.

 

Link to comment
Share on other sites

I have to admit that all this is over my head :(

I will have to live with the way that I have other ways/tools to remove videos from shares.

I am no expert but it seems all this dependent on how your share mounted on the smv/ntfs etc server, how is it mounted on the emby server and then all this stuff about what to do to make emby be able to delete files etc.

While it is exciting for Linix people deal with it (maybe for me as well) it is really difficult for a regular emby user.

As a "regular emby user", I would be happy with a "procedural" solution, e.g. do these steps (see above and add if needed) then emby will have full right to write/read - it will WORK.

Until it's not clear it will be neverending treads like this one from others ....

 

Link to comment
Share on other sites

mastrmind11
18 hours ago, chudak said:

I have to admit that all this is over my head :(

I will have to live with the way that I have other ways/tools to remove videos from shares.

I am no expert but it seems all this dependent on how your share mounted on the smv/ntfs etc server, how is it mounted on the emby server and then all this stuff about what to do to make emby be able to delete files etc.

While it is exciting for Linix people deal with it (maybe for me as well) it is really difficult for a regular emby user.

As a "regular emby user", I would be happy with a "procedural" solution, e.g. do these steps (see above and add if needed) then emby will have full right to write/read - it will WORK.

Until it's not clear it will be neverending treads like this one from others ....

 

The issue here is there is no 1 size fits all solution in linux land.  There are so many variables that are user and system specific, it's not really possible to make it precedural and guarantee it will work for every system out there.  The file permission guide is about as close as we can get for something like this.  Which is why these forums exist, and why the community is here.  I've fielded a lot of file permissioning questions on here the past few years and I don't mind, nor doe anyone else. If we did, we just wouldn't frequent these boards.  

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...
alucryd

@chudak Knowing how the linux filesystem and permissions work are the most basic stuff and an absolute requirement if you want to persist using distros like arch or gentoo. I suggest you have a look at: https://wiki.archlinux.org/index.php/File_permissions_and_attributes

If that's way over your head, which is completely fine, there are more beginner friendly distros out there, like Ubuntu. The emby package for Ubuntu does not use any of the advanced systemd hardening features and should work out of the box.

  • Like 1
  • Haha 1
Link to comment
Share on other sites

  • 2 weeks later...
chudak
On 9/26/2020 at 6:05 AM, alucryd said:

@chudak Knowing how the linux filesystem and permissions work are the most basic stuff and an absolute requirement if you want to persist using distros like arch or gentoo. I suggest you have a look at: https://wiki.archlinux.org/index.php/File_permissions_and_attributes

If that's way over your head, which is completely fine, there are more beginner friendly distros out there, like Ubuntu. The emby package for Ubuntu does not use any of the advanced systemd hardening features and should work out of the box.

 

Let's try talk a little more specifics.

My samba share is managed by OMV and permissions for "others" is full "write/read/execute" and it works.

What do you do to enable emby be able to delete a video ?

 

Edited by chudak
Link to comment
Share on other sites

  • 4 weeks later...
8 hours ago, alucryd said:

I've expanded the arch wiki to be more specific, please take a look: https://wiki.archlinux.org/index.php/Emby

That looks good, now the question is if it work for most of users.

For me it does not.  I wanted to give "users" group permissions to delete

My permissions :

drwxr-xr-x 2 user_name root     0 Oct 31 13:40 Shows

So line: 

 

# give ownership of your media files to the media group
chgrp -R media /mnt/media_files

does not do anything, group assignment stays as "root" (with sudo or as the 'root' user)

I suggest to gather typical users' issues and have a troubleshooting section.

Thanks for looking into this !

Link to comment
Share on other sites

mastrmind11
3 hours ago, chudak said:

That looks good, now the question is if it work for most of users.

For me it does not.  I wanted to give "users" group permissions to delete

My permissions :

drwxr-xr-x 2 user_name root     0 Oct 31 13:40 Shows

So line: 

 


# give ownership of your media files to the media group
chgrp -R media /mnt/media_files

does not do anything, group assignment stays as "root" (with sudo or as the 'root' user)

I suggest to gather typical users' issues and have a troubleshooting section.

Thanks for looking into this !

so the chgrp command doesn't change your group owner?  that's pretty odd considering that's what the command is supposed to do, on every flavor of linux.  what happens if you do sudo chown -R user_name:media /mnt/media_files?  check dmesg after too

Edited by mastrmind11
Link to comment
Share on other sites

21 hours ago, mastrmind11 said:

so the chgrp command doesn't change your group owner?  that's pretty odd considering that's what the command is supposed to do, on every flavor of linux.  what happens if you do sudo chown -R user_name:media /mnt/media_files?  check dmesg after too

 

@mastrmind11

I think I figured this out, see below.

In my case (and possibly for other users as well), it's very important how files were mounted.

I used samba and the way for 'emby; user/group should enforce usi and gui  look like:

//pi-nas/Public /media/pi-nas cifs guest,uid=998,gid=998,forceuid,forcegid,iocharset=utf8 0 0

Then my emby.service loaction was in /usr/lib/systemd/system/emby-server@.service

That worked!

Thanks and consider adding this into wiki.

 

Link to comment
Share on other sites

mastrmind11
2 minutes ago, chudak said:

 

@mastrmind11

I think I figured this out, see below.

In my case (and possibly for other users as well), it's very important how files were mounted.

I used samba and the way for 'emby; user/group should enforce usi and gui  look like:

//pi-nas/Public /media/pi-nas cifs guest,uid=998,gid=998,forceuid,forcegid,iocharset=utf8 0 0

Then my emby.service loaction was in /usr/lib/systemd/system/emby-server@.service

That worked!

Thanks and consider adding this into wiki.

 

ah, I must have missed the part where you said this was a cifs mount.  yeah,  fstab would definitely play a part in permissions.  glad you got it worked out.

Link to comment
Share on other sites

On 11/3/2020 at 11:23 AM, mastrmind11 said:

ah, I must have missed the part where you said this was a cifs mount.  yeah,  fstab would definitely play a part in permissions.  glad you got it worked out.

If the file system local to emby server then it's a simple case and likely no modifications needed.

Complexity definitely comes from SMB or NFS etc. mounts, therefor deserves to be documented.

Thx ! 

Link to comment
Share on other sites

  • 9 months later...
chudak

I noticed that iOS clients (iPhone and iPad) oddly enough Don’t remove media files via UI even though via browsers it works just fine…

 

any reason for this or just a little bug 🕷?

Link to comment
Share on other sites

7 hours ago, chudak said:

I noticed that iOS clients (iPhone and iPad) oddly enough Don’t remove media files via UI even though via browsers it works just fine…

 

any reason for this or just a little bug 🕷?

It's resolved for the next update to the iOS app. Thanks.

Link to comment
Share on other sites

  • 1 month later...

Banned, and this will apply to anyone coming to the community support forum that do not respect other members, we do not allow or want these kind of personals.

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