This post is aimed at brand new users who need help setting the file permissions so that Emby can access your media.
File permissions for Linux native filesystems
The first thing you need to understand is how Linux determines the file permissions for any file on a compatible file system, e.g. ext4, ext3, xfs, btrfs, etc. You can view the current file permissions by typing
ls -l /path/to/media
Doing so should leave you with output like
drwxr-xr-x. 2 emby users 4096 Dec 22 23:05 Transporter 3 (2008) drwxrwxr-x. 2 emby users 4096 Dec 22 23:09 Transporter, The (2002) drwxrwxr-x. 2 emby users 4096 Dec 22 23:03 Van Helsing (2004) drwxr-xr-x. 2 emby users 4096 Dec 22 23:01 Veronica Mars (2014) drwxrwxr-x. 2 emby users 4096 Dec 22 23:11 V for Vendetta (2005) drwxr-xr-x. 2 emby users 4096 Dec 22 23:12 WALL·E (2008) drwxr-xr-x. 2 emby users 4096 Dec 22 23:10 Whiplash (2014)
The first column gives you the file permissions as they are right now. Let's break it down: there will always be ten letters possibly mixed with dashes in the column.
The first letter/dash denotes whether that item is a directory or not. The next nine letters will always be a combination of rwx and dashes and tell you the read, write, and execute permissions for the owner, the group, and others.
Now let's break down the example give above, specifically Veronica Mars (2014). As you can see by the first letter in the first column, the d, the item is a directory. The next three letters as you already know set the permissions for the owner. In this case, rwx means the owner has read, write, and execute permissions. The next three letters/dashes tell you the permissions for the group. r-x means that group has read permissions and execute permissions on the directory. The last three letters are also r-x and mean that everyone who doesn't either own the file or belong to the group that owns it has read and execute permissions to the file.
The user who owns the file will be the third column from the left. In the examples above, the files are all owned by the emby user. The group that owns the file will be the fourth column from the left. Again, in the examples above, the files are owned by the group users.
WORD OF CAUTION: execute permissions are a bit tricky to see as the execute permission for a directory means it can be opened by a anyone who has the execute permission. For a file, the execute permission means that the file can execute code (potentially dangerous if you don't know for sure that the file is safe). Generally, as long as you are keeping your system up to date and don't randomly type in your sudo password to a file that is execting it is extremely difficult for a virus to get onto your system.
File permissions for NTFS and other Windows based filesystems
NTFS has limitations on Linux because of the way that Windows handles file permissions. Consequently, when an NTFS drive is mounted, the user must decide who owns ALL of the files on the drive.
If you are mounting the NTFS drive via the fstab, you can set the file permissions by adding rw,uid=username,gid=groupname to the mount options. For NTFS drives that will never be unplugged from the computer, this is the preferred method to mount the drive.
If you are mounting the drive using the auto-mounting provided by the distro, you will need to add rw,uid=username,gid=groupname to the mount options for the auto-mounter. In Gnome, this can be accomplished via Disks. I am unsure about KDE (anyone willing to let me know, please do so).
WORD OF CAUTION: all drives in the fstab MUST be available to the system at all times. If a drive is in the fstab but not available at boot, the boot sequence will drop to a rescue shell.