Q-Droid 989 Posted November 30, 2024 Posted November 30, 2024 Access depends on directory (folder) and file ownership along the paths on those drives and what permissions they have. Ownership and permissions trump everything else except for user root. I don't use Dolphin or GUI desktop and I'm not familiar with the symbols though the small locks are fairly obvious. I see a small arrow on the emby folder and a little dude in a hat(?) A "details" view that shows ownership and permissions would be more useful. By default Emby is a sandboxed application on Arch running as a DynamicUser. This restricts access to read-only on files/directories outside of the emby user home. If you've changed this or extended the config then you should be able to modify those changes to include the backup destination path so that Emby can create folders and files at that location. Then the backup plug-in should work. Are you able to delete media from within the Emby app?
IAmHugh 63 Posted November 30, 2024 Posted November 30, 2024 (edited) 1 hour ago, Q-Droid said: Are you able to delete media from within the Emby app? Give me a bit to create and add a test folder with test content in it. @Q-DroidOK looks like it's what you thought. Read-only file system : '/mnt/My Files I/Movies/Test Media/*batteries Not Included (1987).mkv' Edited November 30, 2024 by CummingCowGirl
IAmHugh 63 Posted November 30, 2024 Posted November 30, 2024 (edited) # create the media group groupadd media # optionally add your_user to the media group usermod -aG media emby # give ownership of your media files to the media group chgrp -R media "/mnt/My Files II/TV Series/" # make the files writeable to the media group find "/mnt/My Files II/TV Series/" -type f -exec chmod 664 {} + # make the directories writeable to the media group find "/mnt/My Files II/TV Series/" -type d -exec chmod 775 {} + # add the sticky group bit so that newly created directories belong to the media group find "/mnt/My Files II/TV Series/" -type d -exec chmod g+s {} + Would this be correct? If so I have two questions is give the same as add or would media be taking ownership away from other users? Can I add more directories to each of these so as not to have to do each command several times just to cover all media directories? Like below. chgrp -R media "/mnt/My Files II/ TV Series/" "/mnt/My Files II/ Last Night's/" "/mnt/My Files II/ TV Specials/" "/mnt/My Files II/Series To Catch Up On/" https://pastebin.com/RvGLQJDg /mnt/My Files II/TV Series groups emby ✔ 09:00:30 AM sys games scanner wheel input kvm lp video libvirt realtime autologin cups sambashare media emby Edited November 30, 2024 by CummingCowGirl
Q-Droid 989 Posted November 30, 2024 Posted November 30, 2024 The idea behind those instructions is to allow for multiple users to have read-write access to the media files. Specifically your own user account on this host and the Emby server runtime user - emby. This way you can add media and emby will be able to access/modify those files and directories. It should also be a one-time thing for those paths but if you have media under "/mnt/My Files I", "/mnt/My Files II", "/mnt/My Files III" or add new storage paths later then you have to do it for each and preferably at a base level where you don't have to go deeper for individual directories. How you approach it depends on your directory structure and if it contains just media or other files too. It might look complicated but it isn't. 2. The user getting the media group is your own or others, not emby. That comes later. Change "emby" to your login or to the other user(s) on this host who add or need access to the media. 3. Give is change. This is recursively changing the group ownership to media. Yes, it may take access away from others and why those users should also get the media group. You can run the command for a list of paths like you have above. 4. Updating permissions so the media group can read/write files. 5. Updating permissions so the media group can read/write directories. 6. This makes the group ownership sticky. New files and directories will inherit the group. The steps above won't work until after the next steps and a restart. This is when you extend the service unit to allow access to the paths and add the media group to user emby. If you click on the Arch docs "extend-the-unit" link it shows how and you want to take the override option. sudo systemctl edit emby-server.service Add these lines, save and restart emby. Replace the paths with your own. It's a space delimited list, use quotes for the names with spaces in them. You can also include the backup destination path if it's separate from these. [Service] SupplementaryGroups=media ReadWritePaths="/mnt/My Files I" "/mnt/My Files II" "/mnt/My Files III" UMask=0002
IAmHugh 63 Posted November 30, 2024 Posted November 30, 2024 (edited) Correct me if I'm wrong so basically I a cccp would still have full access but would be getting that through the media group so by rights I wouldn't really notice a change when I go to copy to, copy from move to, move from, or delete media from my various media folders? As for adding what you suggest where does that go? Edited November 30, 2024 by CummingCowGirl
Q-Droid 989 Posted November 30, 2024 Posted November 30, 2024 44 minutes ago, CummingCowGirl said: Correct me if I'm wrong so basically I a cccp would still have full access but would be getting that through the media group so by rights I wouldn't really notice a change when I go to copy to, copy from move to, move from, or delete media from my various media folders? That's the goal. Copy and delete should be transparent and work using the access given at the group level. "Move to" can be weird because the command attempts to preserve ownership and permissions of the original. Moving things into the media tree (instead of copy) can leave you with unexpected results for access though not much different if at all from what you've had until now. 51 minutes ago, CummingCowGirl said: As for adding what you suggest where does that go? Adding the service override settings? The systemctl edit command opens a nano editor with the current settings commented out. You add the new settings (overrides) in the editor as guided by the comments you'll see when you run it. The service will continue to use the original settings and add or replace the ones you include in the override. The Arch documentation is not the only way or even the best way, IMO. It is a good step in the right direction and it will get the backups and media access working for you. If trying the backup plug-in was the first time you noticed access problems this is not going to make them worse.
Barlog9511 17 Posted December 2, 2024 Author Posted December 2, 2024 @LukeI dig where the actual problem is, so it was not on external or internal storage. The main issue was that somehow /var/lib/emby/data/library.db was corrupted, main server works fine bud something was wrong with this file ... So I made the radical approach and restored the last EMBY backup, This helped, and now is /var/lib/emby/data/library.db OK and the Backup task works again 1
Luke 42077 Posted December 2, 2024 Posted December 2, 2024 38 minutes ago, Barlog9511 said: @LukeI dig where the actual problem is, so it was not on external or internal storage. The main issue was that somehow /var/lib/emby/data/library.db was corrupted, main server works fine bud something was wrong with this file ... So I made the radical approach and restored the last EMBY backup, This helped, and now is /var/lib/emby/data/library.db OK and the Backup task works again That's strange. Did you also do a software reinstall as part of this process?
Barlog9511 17 Posted December 2, 2024 Author Posted December 2, 2024 1 minute ago, Luke said: That's strange. Did you also do a software reinstall as part of this process? So I just reinstall Backup plugin 1
IAmHugh 63 Posted December 2, 2024 Posted December 2, 2024 8 hours ago, Barlog9511 said: @LukeI dig where the actual problem is, so it was not on external or internal storage. The main issue was that somehow /var/lib/emby/data/library.db was corrupted, main server works fine bud something was wrong with this file ... So I made the radical approach and restored the last EMBY backup, This helped, and now is /var/lib/emby/data/library.db OK and the Backup task works again You do realize that has nothing to do with my issue, right?
Barlog9511 17 Posted December 2, 2024 Author Posted December 2, 2024 56 minutes ago, CummingCowGirl said: You do realize that has nothing to do with my issue, right? yes but it was the solution to my issue that I created this issue for
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now