Cortimi 0 Posted July 24, 2018 Share Posted July 24, 2018 (edited) Ok, here we go, it doesn't work. I have looked around, and what I need to do according to the warning in Emby (grant the Emby system user at least read access to your storage locations) there is no tutorial for. How to grant permissions? What permissions? I need to know what exactly this software is wanting and how to fix it.I have a 500GB ext4 partition on an external drive. It is mounted properly. It is not NTFS. No other program has any trouble with finding it or using it. Only Emby is failing.Permission for partition are proper:"ls -l /media/cortimi/Storagetotal 56drwxrwxr-x 2 cortimi cortimi 4096 Jul 23 22:39 Firefoxdrwx------ 2 root root 16384 Jul 23 13:46 lost+founddrwxrwxr-x 2 cortimi cortimi 4096 Jul 23 15:39 'Meme Locker'drwxrwxr-x 2 cortimi cortimi 4096 Jul 23 15:38 Music..."Any ideas? Edited July 24, 2018 by Cortimi Link to comment Share on other sites More sharing options...
c0utta 10 Posted July 24, 2018 Share Posted July 24, 2018 Hard to help if you don't tell us: - what flavour of Linux? - how did you do the install? - what doesn't work? I'm using Ubuntu 16.04 (terminal only) and installed as per https://emby.media/linux-server.html. I didn't need to grant any permissions because my media is also r-x for all users - same as yours. I assume the same permissions cascades down into Music? Link to comment Share on other sites More sharing options...
mastrmind11 717 Posted July 24, 2018 Share Posted July 24, 2018 Well, assuming Emby is running as user emby, does the emby user belong to the cortimi group? If not, then your permissions are not "proper". The reason your other programs work is likely because they are running as user cortimi. So, googling around for how to add a user to an existing group will likely solve your problem. Link to comment Share on other sites More sharing options...
Luke 37125 Posted July 24, 2018 Share Posted July 24, 2018 @@c0utta, please let us know if this helps. thanks ! Link to comment Share on other sites More sharing options...
icsy7867 8 Posted July 24, 2018 Share Posted July 24, 2018 Your permissions are currently 775, this should be enough for emby (And anyone else!) to read you files. Can you: ls -l /media/cortimi/Storage/Music I want to make sure that the files here have the same permissions. You can try: chown -R cortimi:Emby /media/cortimi/Storage/Music Alternatively you can add your "Emby" user to your cortimi group: usermod -a -G cortimi Emby This will give the group "Emby" permissions on the folder and sub-files. However having the files world readable you should not have these issues. Which is why I am curious as to the permissions on the files within the folder. Link to comment Share on other sites More sharing options...
Luke 37125 Posted July 24, 2018 Share Posted July 24, 2018 Thanks @@icsy7867 ! Link to comment Share on other sites More sharing options...
Cortimi 0 Posted July 25, 2018 Author Share Posted July 25, 2018 Your permissions are currently 775, this should be enough for emby (And anyone else!) to read you files. Can you: ls -l /media/cortimi/Storage/Music I want to make sure that the files here have the same permissions. You can try: chown -R cortimi:Emby /media/cortimi/Storage/Music Alternatively you can add your "Emby" user to your cortimi group: usermod -a -G cortimi Emby This will give the group "Emby" permissions on the folder and sub-files. However having the files world readable you should not have these issues. Which is why I am curious as to the permissions on the files within the folder. Will give that a try when I get back to the machine, thanks. Link to comment Share on other sites More sharing options...
Cortimi 0 Posted July 25, 2018 Author Share Posted July 25, 2018 (edited) Ok, cleaned everything out of the drive, this is what we have:$ ls -l /media/cortimi/Storagetotal 28drwxrwxr-x 2 cortimi cortimi 4096 Jul 25 04:23 Embydrwxrwxr-x 2 cortimi cortimi 4096 Jul 25 02:01 Firefoxdrwx------ 2 root root 16384 Jul 25 00:11 lost+founddrwxr-xr-x 9 root root 4096 Jul 25 01:02 timeshift The Emby folder is the one I want to use. It currently just has a test .wma file that I copied over from my Download folder on main drive.$ ls -l /media/cortimi/Storage/Embytotal 96-rw-rw-r-- 1 cortimi cortimi 94977 Apr 9 2011 Alarm-03.wma$ chown -R cortimi:Emby /media/cortimi/Storagechown: invalid group: ‘cortimi:Emby’$ usermod -a -G cortimi Embyusermod: user 'Emby' does not existEmby was installed using the Ubuntu X64 .Deb package found here: https://emby.media/linux-server.htmlI am using Linux Mint 19 (Ubuntu 18.04 based) 64-bit.I am accessing the program through Firefox using the address: http://localhost:8096First, I click "Add Media Library", it takes me to a screen with "Content Type", "Display Name" and a Folder with + sign. I click the plus sign. Next screen has an input area for "Folder" and a selection menu of different paths on the drive. /media is not an available option. If I manually enter "/media/cortimi/Storage", I get an error that path is not found. If I enter "/media/cortimi/Storage/Emby", I get the same error that path is not found. Edited July 25, 2018 by Cortimi Link to comment Share on other sites More sharing options...
Loke 4 Posted July 25, 2018 Share Posted July 25, 2018 it's "emby" not "Emby", usernames as most everything in Linux is case sensitive. Adding emby to your group should solve most if not all your permissions problems. Link to comment Share on other sites More sharing options...
Cortimi 0 Posted July 25, 2018 Author Share Posted July 25, 2018 (edited) it's "emby" not "Emby", usernames as most everything in Linux is case sensitive. Adding emby to your group should solve most if not all your permissions problems. Ok, was copying and pasting what someone else had wrote. This doesn't give an error in terminal but it changes nothing in Emby. Still not working. Edited July 26, 2018 by Cortimi Link to comment Share on other sites More sharing options...
c0utta 10 Posted July 26, 2018 Share Posted July 26, 2018 Please show the results of: ls -al /media ls -al /media/cortimi ls -al /media/cortimi/Storage ls -al /media/cortimi/Storage/Emby We can then see the full tree to see permissions and ownership all the way down. My guess is that a higher level folder is denying access to the emby user. Link to comment Share on other sites More sharing options...
Cortimi 0 Posted July 27, 2018 Author Share Posted July 27, 2018 cortimi@Dopminter:~$ ls -al /mediatotal 16drwxr-xr-x 4 root root 4096 Jul 26 00:00 .drwxr-xr-x 25 root root 4096 Jul 25 22:51 ..drwxr-x---+ 3 root root 4096 Jul 27 11:04 cortimidrwxr-x---+ 2 root root 4096 Jul 27 11:04 rootcortimi@Dopminter:~$ ls -al /media/cortimitotal 12drwxr-x---+ 3 root root 4096 Jul 27 11:04 .drwxr-xr-x 4 root root 4096 Jul 26 00:00 ..drwxrwxrwx 10 cortimi cortimi 4096 Jul 27 01:54 Storagecortimi@Dopminter:~$ ls -al /media/cortimi/Storagetotal 52drwxrwxrwx 10 cortimi cortimi 4096 Jul 27 01:54 .drwxr-x---+ 3 root root 4096 Jul 27 11:04 ..drwxrwxr-x 2 cortimi cortimi 4096 Jul 25 22:41 Downloadsdrwxrwxr-x 2 cortimi emby 4096 Jul 25 04:23 Embydrwx------ 2 root root 16384 Jul 25 00:11 lost+founddrwxrwxr-x 3 cortimi cortimi 4096 Jul 27 02:02 Steamdrwxr-xr-x 9 root root 4096 Jul 27 01:01 timeshiftdrwxrwxr-x 4 cortimi cortimi 4096 Jul 27 02:13 Torrentsdrwx------ 4 cortimi cortimi 4096 Jul 25 04:20 .Trash-1000drwxrwxr-x 2 cortimi cortimi 4096 Jul 25 22:45 Zetacortimi@Dopminter:~$ ls -al /media/cortimi/Storage/Embytotal 104drwxrwxr-x 2 cortimi emby 4096 Jul 25 04:23 .drwxrwxrwx 10 cortimi cortimi 4096 Jul 27 01:54 ..-rw-rw-r-- 1 cortimi emby 94977 Apr 9 2011 Alarm-03.wmaI do appreciate the efforts from everyone so far. Link to comment Share on other sites More sharing options...
mastrmind11 717 Posted July 27, 2018 Share Posted July 27, 2018 (edited) why are you root on 90% of your mount? If you want to set premissions, you have to start at the top level and work down. I'm not sure how this could have ever worked, with anything, unless half your apps run as root?? Bottom line, your permissions are jacked in general. Pick a permission policy and stick to it. Nothing at this level should be owned by root, it's extremely dangerous. However, based on the output from above, the /Emby share should be accessible by emby, and I assume you can play that .wma file? Those permissions are correct (kind of). Edited July 27, 2018 by mastrmind11 Link to comment Share on other sites More sharing options...
Cortimi 0 Posted July 27, 2018 Author Share Posted July 27, 2018 (edited) why are you root on 90% of your mount? If you want to set premissions, you have to start at the top level and work down. I'm not sure how this could have ever worked, with anything, unless half your apps run as root?? Bottom line, your permissions are jacked in general. Pick a permission policy and stick to it. This is how the permissions are set when I partition the drive using the default "Disks" tool in Linux Mint. This is a fresh install of Linux Mint. I didn't "pick a policy", it came this way. I have changed nothing concerning root or anything else. If you look closer, it's not "%90 of the mount", it is only two folders, the lost+found and Timeshift folders; both of which are system folders and require root, as they are run by the OS. Those two folders are for OS backup/system restore utilities. Which only further proves that the drive is working and is usable. So I really don't see how it is "jacked" when the two folders that should be root are root, and everything else that is supposed to user, is user. The only changes I have made were: chown -R cortimi:emby /media/cortimi/Storage/Emby and usermod -a -G cortimi emby However, based on the output from above, the /Emby share should be accessible by emby, and I assume you can play that .wma file? I know it should, but it isn't, that's the entire problem. And yes I can play the .WMA file, it was downloaded to home folder on internal drive and copied over. For what it's worth, Steam and other programs see the drive just fine. Edited July 27, 2018 by Cortimi Link to comment Share on other sites More sharing options...
c0utta 10 Posted July 27, 2018 Share Posted July 27, 2018 Hi Cortimi, Your problem is that Steam and other programs are being run under your ID, but Emby needs to see things as the emby user, and needs to be able to see all the way down the tree from the root. Your problem is that emby can't access /media/cortini which would need to be drwxd-xd-x, not drwxd-x--- Could you also output 'ls -Al /' too please? I forgot that one, sorry. Personally, changing the owner and group of the structure is not the right approach in this case. Better to adjust the permissions. 1 Link to comment Share on other sites More sharing options...
Cortimi 0 Posted July 28, 2018 Author Share Posted July 28, 2018 (edited) $ ls -al /total 2097268drwxr-xr-x 25 root root 4096 Jul 25 22:51 .drwxr-xr-x 25 root root 4096 Jul 25 22:51 ..drwxr-xr-x 2 root root 4096 Jul 25 00:20 bindrwxr-xr-x 4 root root 4096 Jul 25 00:23 bootdrwxr-xr-x 2 root root 4096 Jul 24 19:01 cdromdrwxr-xr-x 22 root root 4520 Jul 27 18:06 devdrwxr-xr-x 160 root root 12288 Jul 27 17:47 etcdrwxr-xr-x 4 root root 4096 Jul 24 19:02 homelrwxrwxrwx 1 root root 33 Jul 25 00:21 initrd.img -> boot/initrd.img-4.15.0-29-genericlrwxrwxrwx 1 root root 33 Jul 24 18:58 initrd.img.old -> boot/initrd.img-4.15.0-20-genericdrwxr-xr-x 24 root root 4096 Jul 25 00:08 libdrwxr-xr-x 2 root root 4096 Jun 26 10:01 lib64drwx------ 2 root root 16384 Jul 24 18:57 lost+founddrwxr-xr-x 4 root root 4096 Jul 26 00:00 mediadrwxr-xr-x 2 root root 4096 Jun 26 10:00 mntdrwxr-xr-x 5 root root 4096 Jul 25 13:06 optdr-xr-xr-x 260 root root 0 Jul 27 16:42 procdrwx------ 6 root root 4096 Jul 25 22:58 rootdrwxr-xr-x 36 root root 1140 Jul 27 17:30 rundrwxr-xr-x 2 root root 12288 Jul 25 02:01 sbindrwxr-xr-x 13 root root 4096 Jul 27 17:44 snapdrwxr-xr-x 2 root root 4096 Jun 26 10:00 srvdrwxr-xr-x 2 cortimi cortimi 4096 Jul 25 22:51 storage-rw------- 1 root root 2147483648 Jul 24 18:58 swapfiledr-xr-xr-x 13 root root 0 Jul 27 16:42 sysdrwxrwxrwt 26 root root 4096 Jul 27 19:21 tmpdrwxr-xr-x 10 root root 4096 Jun 26 10:00 usrdrwxr-xr-x 13 root root 4096 Jul 25 01:26 varlrwxrwxrwx 1 root root 30 Jul 25 00:21 vmlinuz -> boot/vmlinuz-4.15.0-29-genericlrwxrwxrwx 1 root root 30 Jul 25 00:21 vmlinuz.old -> boot/vmlinuz-4.15.0-20-generic$ ls -al /mediatotal 16drwxr-xr-x 4 root root 4096 Jul 26 00:00 .drwxr-xr-x 25 root root 4096 Jul 25 22:51 ..drwxr-x---+ 3 root root 4096 Jul 27 16:43 cortimidrwxr-x---+ 2 root root 4096 Jul 27 11:04 root$ ls -al /media/cortimitotal 12drwxr-x---+ 3 root root 4096 Jul 27 16:43 .drwxr-xr-x 4 root root 4096 Jul 26 00:00 ..drwxrwxrwx 10 cortimi cortimi 4096 Jul 27 01:54 Storage$ ls -al /media/cortimi/Storagetotal 52drwxrwxrwx 10 cortimi cortimi 4096 Jul 27 01:54 .drwxr-x---+ 3 root root 4096 Jul 27 16:43 ..drwxrwxr-x 2 cortimi cortimi 4096 Jul 25 22:41 Downloadsdrwxrwxr-x 2 cortimi emby 4096 Jul 25 04:23 Embydrwx------ 2 root root 16384 Jul 25 00:11 lost+founddrwxrwxr-x 3 cortimi cortimi 4096 Jul 27 02:02 Steamdrwxr-xr-x 9 root root 4096 Jul 27 01:01 timeshiftdrwxrwxr-x 4 cortimi cortimi 4096 Jul 27 02:13 Torrentsdrwx------ 4 cortimi cortimi 4096 Jul 25 04:20 .Trash-1000drwxrwxr-x 2 cortimi cortimi 4096 Jul 25 22:45 Zeta Edited July 28, 2018 by Cortimi Link to comment Share on other sites More sharing options...
Solution c0utta 10 Posted July 28, 2018 Solution Share Posted July 28, 2018 I'd do: chmod -R a+rx /media/cortimi This adds read and execute for all users from /media/cortini downwards. Then use the flashlight in Emby's library folder to navigate. If you can't see the folders then report back. 1 Link to comment Share on other sites More sharing options...
Cortimi 0 Posted July 28, 2018 Author Share Posted July 28, 2018 I'd do: chmod -R a+rx /media/cortimi This adds read and execute for all users from /media/cortini downwards. Then use the flashlight in Emby's library folder to navigate. If you can't see the folders then report back. Holy shit, that worked! Why? What exactly did I just copy and paste? Link to comment Share on other sites More sharing options...
c0utta 10 Posted July 28, 2018 Share Posted July 28, 2018 (edited) I now have full access to your system. Ha! Joking. Have a read about basic Linux permissions and ownership (there are plenty of guides that give a better explanation than I will), but the trick is being able to think about how other users see the file structure. Also, to understand the difference between ownership and permissions and how they interact. Essentially - "although cortimi can see the file, can emby see all the way down through each folder to the file?". I use the "sudo -u <user> ls -al /mnt/folder" command sometimes to see what <user> can see in /mnt/folder. Finally, the commands you ran (not to show disrespect to others) should really be undone: Give ownership back to the cortimi group using: chown -R cortimi:cortimi /media/cortimi/Storage/Emby this will reverse: chown -R cortimi:emby /media/cortimi/Storage/Emby because emby shouldn't have group ownership to any of these media files - they're yours, not emby's Remove the emby user from the cortimi group: gpasswd -d emby cortimi this will reverse: usermod -a -G cortimi emby because adding the emby user to the group serves no purpose in this case Edited July 28, 2018 by c0utta 1 Link to comment Share on other sites More sharing options...
Cortimi 0 Posted July 28, 2018 Author Share Posted July 28, 2018 Thank you. Marking resolved. You guys are all world class. Link to comment Share on other sites More sharing options...
Luke 37125 Posted July 29, 2018 Share Posted July 29, 2018 @@c0utta thanks for your persistence in helping with this ! Link to comment Share on other sites More sharing options...
Stlk filmes 1 Posted November 11, 2019 Share Posted November 11, 2019 Good night, I have the same problem, create virtual disk with Rclone, mount the disk ok, just emby does not see the folder in the library, if you can help. thanks Link to comment Share on other sites More sharing options...
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