Jump to content

Linux permissions (yet again.... and again)


Go to solution Solved by sargenthp,

Recommended Posts

johnsonb
Posted

Hello all. I was struggling with Mint and permissions using external drives. I then mounted the drives inside the case and I am still having file permission troubles. I tried

 

chown emby.emby /media// -R
chmod 755 /media//

then 

chown -R emby /media/bj/Media-3T

chgrp -R emby /media/bj/Media-3T

with no luck. I can't be too far off. The drive with the media is /media/bj/Media-3T

thanks, Bj

 

 

mastrmind11
Posted

what permissions does media, bj, and media-3t have?  run ls -l on all 3 folders and post the outputs here.

johnsonb
Posted

Hi. I'd love to pass on that info however I locked myself out of the /media directory. A a regular user I get 'permission denied'. I tried to see if I can see the new drives at all and with sudo nemo I see no new  drives.

My fault for trying 72 different things I saw online - chown, setfacl etc.

Other than re-installing Mint (which I do not want to do, its dual boot and it was tricky getting it just right) what can I do to get back to regular permissions.

Bj 

  • Solution
sargenthp
Posted (edited)

Switch to root:  sudo su -

Change your media folder and bj ownership back to root...
     chown root:root /media
     chmod 755 /media
     chown root:root /media/bj
     chmod 755 /media/bj

Now I would check the permissions on your /media/bj/Media-3T.

What I like to use for emby is using facls.  So for example to make the user emby to have full rights to /media/bj/Media-3T and all subfolders, plus get that by default for newly added content...  setfacl -Rm u:emby:rwx,d:u:emby:rwx /media/bj/Media-3T

Once you do that I like to switch to the emby user and verify that I can get to the content...  
  sudo -u emby /bin/bash
  cd /media/bj/Media-3T
  ls -l

 

I also personally like to mount my drives to a specific location other than auto mounting within media.  So I created entries within /etc/fstab for each external drive I have.  But the drives must be connected at all times.

Edited by sargenthp
  • Thanks 1
johnsonb
Posted
33 minutes ago, sargenthp said:

Switch to root:  sudo su -

Change your media folder and bj ownership back to root...
     chown root:root /media
     chmod 755 /media
     chown root:root /media/bj
     chmod 755 /media/bj

Now I would check the permissions on your /media/bj/Media-3T.

What I like to use for emby is using facls.  So for example to make the user emby to have full rights to /media/bj/Media-3T and all subfolders, plus get that by default for newly added content...  setfacl -Rm u:emby:rwx,d:u:emby:rwx /media/bj/Media-3T

Once you do that I like to switch to the emby user and verify that I can get to the content...  sudo -u emby /bin/bash

I thank you so very much sargenthp! Emby sees my video library perfectly. I'm nothing short of giddy!

thanks again, Bj

  • Like 1
Posted
2 hours ago, johnsonb said:

I thank you so very much sargenthp! Emby sees my video library perfectly. I'm nothing short of giddy!

thanks again, Bj

Thanks for the feedback.

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