Not able to access an encrypted partition from a persistent Live Ubuntu Installation

Solution 1:

I have seen this before. The directory under /media/ where this type of mounting takes place (from a GUI File Manager) is probably owned by root.

In my case I just did the following:

sudo chmod 777 /media/jeff

Now /media looks like this:

jeff@dvXubu2004:~$ ls -la /media/
total 16
drwxr-xr-x 4 root root 4096 Mar 24 2020 .
drwxr-xr-x 20 root root 4096 Jun 29 11:54 ..
drwxrwxrwx+ 4 root root 4096 Jul 4 12:56 jeff

I believe that this is fine for a single-user system or a persistent USB but I'm open to suggestions if others disagree. Read on to see why...

I mount a LUKS encrypted usb drive with my File Manager as you are trying to do. Once mounted, notice that the device name "WdMyBk4TB01" now appears as a directory under /media/jeff with jeff:jeff ownership and no access for any user other than jeff. So I contend that even on a multi-user system that only I would have any access to the drive.

jeff@dvXubu2004:~$ ls -la /media/jeff/
total 16
drwxrwxrwx+ 4 root root 4096 Jul 4 12:56 .
drwxr-xr-x 4 root root 4096 Mar 24 2020 ..
drwx------ 5 jeff jeff 4096 Jun 27 17:44 WdMyBk4TB01

But then why not just do this?:

sudo chown jeff:jeff /media/jeff/

and

sudo chmod 700 /media/jeff/

jeff@dvXubu2004:~$ ls -l /media/
total 8
drwx------+ 4 jeff jeff 4096 Jul 5 22:27 jeff

And why doesn't Ubuntu do it this way--or at least offer to do it this way. I and only I should ever use /media/jeff. Right?

I read a long thread about Access Control Lists that made my hair hurt.

chmod 777 just seems wrong so I just had to come back and offer another solution.

Hope that helps.