Jump to content

Veracrypt Mouting Permissions


Recommended Posts

Posted

Hi, I was just wondering if anyone has had a similar issue to one I am having. I am running a Kubuntu 18.04 desktop pc and use it as a sort of home server. I recently found out about emby and decided to try and set it up on my home server. Installation goes fine, however when I try to add media, emby cannot view the contents of a mounted veracrypt device due to permissions I assume. I have tried several commands to fix this such as:

sudo usermod -aG my_user emby

However this does not fix the permissions issue. The directory where the veracrypt device is mounted is in /media/veracrypt1, and this directory only allows the user who mounted the device to read it, not even those in the user group and if I change to allow my group to read, the permissions just reset them self.

 

Just wondering if this is a issue anyone has been able to fix or if this is not possible to fix.

 

@@mastrmind11

 

Thanks.

  • 2 years later...
mrfragger
Posted (edited)
On 1/22/2019 at 3:50 AM, mastrmind11 said:

pretty much did what basj did and it worked but don't need to specify the mount point in the first command

Quote

veracrypt /dev/sda6 /mnt/D --filesystem=none

sudo mount -o umask=000 /dev/mapper/veracrypt1 /mnt/D

 

Here's my more detailed instructions for veracrypt under linux for reference

After mounting an encrypted drive in linux emby won't be able to see your directories on the drive.

Create a directory named emby or whatever you wish to name it.  Do this  just once.

Quote

sudo mkdir /media/emby

Each time you mount the encrypted veracrypt volume
 

Quote

veracrypt /dev/sdb2 --filesystem=none

veracrypt GUI will popup to input your password

Obviously change sdb2 to whatever partition you wish to mount.

umask=022 is like chmod 755 drwxr-xr-x (owner read, write, execute) (group read, execute) (everyone read, execute).

Note: If you don't wanna use the command line for the first option in the veracrypt GUI put in the password and click Options and check Filesystem [Do not mount]

Quote

sudo mount -o umask=022,uid=mint,gid=mint /dev/mapper/veracrypt1 /media/emby

Note: uid=mint,gid=mint which is my username and group I'm logged in under. Change mint to whatever your username and group is.

if you don't specify uid (user user id) and gid (group id) it will default to root root and emby won't be able to see directories when trying to add libraries in the emby webui. 

If you specify uid=emby,gid=emby it will work however using the filemanager won't let you use the trash and you must SHIFT-delete any file.  Best to use whatever username (mine is mint) you're logged in as and trash works like normal.

Quote

ls -al /media/emby/


drwxr-xr-x 1 mint mint 131072 Dec 31  1969  .
drwxr-xr-x 5 root root   4096 Aug  9 12:55  ..
drwxr-xr-x 1 mint mint 131072 May  6  2019  audiobooks
drwxr-xr-x 1 mint mint 131072 Jul 18 16:21  movies
drwxr-xr-x 1 mint mint 131072 Aug  4 18:12  'tv shows'

to unmount do umount - failing to do this might next time when mounting give you the following: WARN: volume was not unmounted cleanly. Or in the filemanager you can right click on the Volume then Unmount

Quote

sudo umount /media/emby

then in Veracrypt GUI click dismount

This is on Linux Mint 20.2 which is Ubuntu 20.04 more or less so
if gid=mint,uid=mint doesn't work on your version of linux do

Quote

id mint

substituting mint for your username and it'll give you

uid=1000(mint) gid=1000(mint) groups=1000(mint),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),114(lpadmin),134(sambashare),999(emby)

and instead of gid=mint,uid=mint put uid=1000,gid=1000 or whatever the corresponding numbers are

 

 

Edited by mrfragger

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