Veracrypt - Mount as a specific user

3.5k Views Asked by At

After I mount a veracrypt volume with the root user like so:

veracrypt --verbose --text --protect-hidden=no --keyfiles="" /dev/sde1 /mnt/somewhere

All the folders and files have a permissions of rwxr-xr-x and a username:group of 1000:1000. Only root have access to it, how can I mount a veracrypt volume for a specific user?

Tried this below but it complains about "wrong fs type, bad option" and will not mount:

veracrypt --verbose --text --protect-hidden=no --keyfiles="" --fs-options="user,username=someone,password=something,uid=someone,gid=someone" /dev/sde1 /mnt/somewhere

I cannot mount it as the user because it is not in the sudoers file.

1

There are 1 best solutions below

1
On

I only had to do chown -R specificUser:specificGroup on the veracrypt volume to make it work. After unmounting and remounting, it will show the same new user.

I "created" the problem because the veracrypt volume has been made on another computer with another user which had a uid and a gid of 1000.