Jump to content

Ununtu 16.04 lts fresh install - Emby Fresh install - Permissions Error?


georgeberz

Recommended Posts

georgeberz

Hi, I was running Win7/emby worked perfectly for over a year! LOVE IT!

My media server PC dual core AMD modern clone w/ 4 gigs ram 160 gig hd

 

Fresh 16.04 install

Fresh emby install as default with emby as the user unchainged

 

During emby web config when it comes to add shows, I select the external hard disk ( tried with NTFS, exfat, and finally ext4) then it will not show any folders on the hard disk.(no matter the formatting of the hard disk file type) I installed Fuse to access exfat by the way and it works wonderful.

 

The instructions on the screen say something about emby permissions...

 

I look for emby as a user in the user config area and no emby there only my admin acct. I go to try to create a emby account and it never lets me click add/ I believe it is because the emby account or user exists and I dont know how to find it to elevate its user levels.

 

People talk about mounting?!? the drive, I am assuming in the GUI and showing the drive in the lower left means it is mounted as I can read write and copy files on and off of it. so we have an emby problem?

 

I am a GUI kinda person, the command line is very scary to me. please be easy on me. assume a total newbie is trying to set this up.

 

Please help

 

 

 

Link to comment
Share on other sites

Using our linux packages, Emby Server does not run under your system user account. the Emby Server process runs under a newly created user on your operating system, called Emby. Therefore you need to make sure the Emby user on your linux box has permission to access the media locations that you're trying to utilize.

Link to comment
Share on other sites

georgeberz

I used your linux package dist and used the 15.10 settings. It is running and I can see files if I put them on internal boot hard disk but when placed on external USB I can see the drive but not folders when trying to add folders.

 

I cannot find the emby user to elevate permissions...

 

I go to users on ubuntu and all I see is my admin account. Where do I find this emby account or what should be entered in terminal to change its permissions?

 

Thank you

 

George

Link to comment
Share on other sites

thefirstofthe300

So the user that emby is running as is a system user.  System users do not appear in that User Account management tool.  More than likely, you will need to use the terminal to get this solved.  If you wish to use Linux, you will eventually run into a situation when you have to use the terminal so please conquer your fear.  You don't need to be a ninja; just be willing to open it up and run a few commands.

 

Mounting is simply attaching a drive to your OS's file system.  It can happen either at boot (when the operating system mounts the root filesystem so that it has access to all your applications and data) or it can happen when you either manually mount it or the system automatically mounts it.  More than likely, you will want to mount the drives at boot.

 

Also, you more than likely don't want to give the emby user sudo permissions (a security hole that can possibly destroy your server should emby get hacked).  Instead, you want to grant emby permissions to access the files on your drives.

 

Before I can help you any more, what filesystem are your drives using?  Is it NTFS?

Link to comment
Share on other sites

Guest plexman

Open your terminal, type "sudo su" to log as administrator. Then to list all users use the command "cut -d: -f1 /etc/passwd", the Emby user is called "emby" (in my ubuntu 14.04 installation is called like that).

 

Then to change the ownership of the folders you have to use the command chown (change owner), like this "chown -R emby:emby /path/to/your/folders". Normally this will make your folders readable by the emby user.

 

The quotation is not part of the command.

 

Source:

http://askubuntu.com/questions/410244/a-command-to-list-all-users-and-how-to-add-delete-modify-users

http://askubuntu.com/questions/6723/change-folder-permissions-and-ownership

Edited by plexman
Link to comment
Share on other sites

dcrdev

Open your terminal, type "sudo su" to log as administrator. Then to list all users use the command "cut -d: -f1 /etc/passwd", the Emby user is called "emby" (in my ubuntu 14.04 installation is called like that).

 

Then to change the ownership of the folders you have to use the command chown (change owner), like this "chown -R emby:emby /path/to/your/folders". Normally this will make your folders readable by the emby user.

 

The quotation is not part of the command.

 

Source:

http://askubuntu.com/questions/410244/a-command-to-list-all-users-and-how-to-add-delete-modify-users

http://askubuntu.com/questions/6723/change-folder-permissions-and-ownership

 

That's not a good idea then all of his media will be owned by the emby user/group and unless those directories have particularly loose permissions he won't be able to access them from any other account.

 

Instead create a new group for media:

sudo groupadd media

 

Add emby and your user to that group:

sudo usermod -aG media emby && usermod -aG media YOUR_USERNAME_HERE

 

Change group ownership of your media directory:

sudo chown -R :emby /path/to/your/folders

 

Make group ownership sticky:

sudo chmod -R g+rwx /path/to/your/folders

Edited by dcrdev
Link to comment
Share on other sites

Guest plexman

That's not a good idea then all of his media will be owned by the emby user/group and unless those directories have particularly loose permissions he won't be able to access them from any other account.

 

Instead create a new group for media:

sudo groupadd media

 

Add emby and your user to that group:

sudo usermod -aG media emby && usermod -aG media YOUR_USERNAME_HERE

 

Change group ownership of your media directory:

sudo chown -R :emby /path/to/your/folders

 

Make group ownership sticky:

sudo chmod -R g+rwx /path/to/your/folders

 

You are totally right, I wrote my answer under the point of view of my dedicater server (with no gui I always use the root user). I forgot he was using desktop, so dcrdev is right, you should use the same group in order to be able to edit your media  ;).

Link to comment
Share on other sites

thefirstofthe300

Thing is, none of that matters if he is using NTFS.  If the drives are NTFS, chmod isn't gonna really help him.  Those permissions have to be set at mount, either in fstab or in something like gnome disks, or udev (heaven forbid).

Edited by thefirstofthe300
Link to comment
Share on other sites

georgeberz

Hi Luke,or anyone else.  I am using NTFS on my external 5 gig usb drive

 

I reinstalled ubuntu again and emby fresh and same problem, the normal user logged in as admin in the gui can access the hard disk fine copy read write delete, but Im assuming at install the Emby account your talking about as a system account needs to be elevated... How do I do that!

 

Did I just find a bug? if the install of emby created a Emby user account and it does this without elevating its access level and no one seems to know how to reaise emby's access level.

 

Changing rights on a hard disk manually dosent seem correct nor do I see any agreed upon method to fix this situation.... I cant be the ony one with this situation

 

ubunu 16.04 lts 64 bit with fresh emby install from the emby site with instructions for emby 15.10 Im assuming it is the same look here

https://software.opensuse.org/download.html?project=home%3Aemby&package=emby-server

 

Please help I have 4 kids and this is how they get thier simpsons futurama and the big bang.

 

thank you

 

George

 

 

Using our linux packages, Emby Server does not run under your system user account. the Emby Server process runs under a newly created user on your operating system, called Emby. Therefore you need to make sure the Emby user on your linux box has permission to access the media locations that you're trying to utilize.

Edited by georgeberz
Link to comment
Share on other sites

georgeberz

Using our linux packages, Emby Server does not run under your system user account. the Emby Server process runs under a newly created user on your operating system, called Emby. Therefore you need to make sure the Emby user on your linux box has permission to access the media locations that you're trying to utilize.

 

Can you help me with this you seem to know what you are talking about...

 

George

Link to comment
Share on other sites

georgeberz

That's not a good idea then all of his media will be owned by the emby user/group and unless those directories have particularly loose permissions he won't be able to access them from any other account.

 

Instead create a new group for media:

sudo groupadd media

 

Add emby and your user to that group:

sudo usermod -aG media emby && usermod -aG media YOUR_USERNAME_HERE

 

Change group ownership of your media directory:

sudo chown -R :emby /path/to/your/folders

 

Make group ownership sticky:

sudo chmod -R g+rwx /path/to/your/folders

 

this part failed

 

 sudo usermod -aG media emby && usermod -aG media media

usermod: Permission denied.

usermod: cannot lock /etc/passwd; try again later.

 

Link to comment
Share on other sites

hurricanehrndz

@@georgeberz

 

Since you are using a windows file system the situation because way more complex. You can not change the permissions. What you can do is mount the drive with different permissions.  You can read more about that here.

 

You will need to remount your external drive. The best way to do that is as follows, this all done in the command line.

 

1. Find your ntfs partition

# sudo lsblk -o NAME,FSTYPE
NAME FSTYPE
sda
└─sda1 ntfs

In the above example the ntfs partition is sda1.

 

2. unmount the partition

umount /dev/sda1

Please note in our example we are using sda1, you will need to change that value appropriately.

 

3. remount the partition

sudo mkdir -p /mnt/media
sudo chmod 777 /mnt/media
sudo mount -t ntfs-3g -o uid=emby,gid=emby,umask=0000 /dev/sda1 /mnt/media

Again update sda1 accordingly.

 

Please let me know if anything is unclear.

 

You will need to run the following after every restart..

sudo mount -t ntfs-3g -o uid=emby,gid=emby,umask=0000 /dev/sda1 /mnt/media 

Or you could append your file system table

sudo cp /etc/fstab /etc/fstab.orig
echo "/dev/sda1 /mnt/media ntfs-3g uid=emby,gid=emby,umask=0000 0 0" | sudo tee -a /etc/fstab 

Again update sda1 accordingly.

Edited by hurricanehrndz
  • Like 2
Link to comment
Share on other sites

dcrdev

this part failed

 

 sudo usermod -aG media emby && usermod -aG media media

usermod: Permission denied.

usermod: cannot lock /etc/passwd; try again later.

 

 

Yeah should be:

 sudo usermod -aG media emby && sudo usermod -aG media media

 

 

But that doesn't matter because you are using NTFS which doesn't support Unix style permissions - as @hurricanehrndz has said you'll want to modify fstab.

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