USB mounted but get This Location could not be displayed

1prophead

New Member
Joined
Aug 13, 2025
Messages
3
Reaction score
2
Credits
42
High millage programmer on my Windows Host - Virtual Ubuntu 24.04.3 - Client - attaching any USB external drive results in mounting it as expected under media/(myuserid)/(DiskID) but when access as (myuser) via nautilus from (myuserid) desktop I get dialog "This location could not be displayed" You do not have permissions necessary to view the contents of (DiskID).
As root I can cd to /media/(myuserid)/(DiskID) and RWX any of the files located there. The permissions issue perisits at (myuserid) level even after I have changed ownership of /media , /media/(myuserid), and /media/(myuserid)/(DiskID) to (myuserid) as well as rwx to all permissions. Note: I have worked with Unix since the early 80s(pre system5) so perhaps I am missing some real neat new protective feature.
 


High millage programmer on my Windows Host - Virtual Ubuntu 24.04.3 - Client - attaching any USB external drive results in mounting it as expected under media/(myuserid)/(DiskID) but when access as (myuser) via nautilus from (myuserid) desktop I get dialog "This location could not be displayed" You do not have permissions necessary to view the contents of (DiskID).
As root I can cd to /media/(myuserid)/(DiskID) and RWX any of the files located there. The permissions issue perisits at (myuserid) level even after I have changed ownership of /media , /media/(myuserid), and /media/(myuserid)/(DiskID) to (myuserid) as well as rwx to all permissions. Note: I have worked with Unix since the early 80s(pre system5) so perhaps I am missing some real neat new protective feature.
Welcome.
There's no mention of what the "external drive" is, so I'll assume for argument's sake that it's a usb stick, which I take it is also unable to be accessed in your situation. Some usb sticks have a form of "protection" controlling access via a small switch which can enable or or disable read and write. I'm assuming the usb isn't encumbered by that. Regardless, there are a few things that can be done to test the situation.

It's worth checking the permissions of the /media directory to see if there are any ACLs applied, that is, "access control list" permissions. If there are, check what they are. For example on this debian machine in a terminal:
Code:
$ ls -al /media
total 16
drwxr-xr-x   4 root root 4096 Mar 19  2024 .
drwxr-xr-x  20 root root 4096 Jul 26 09:25 ..
drwxr-x---+  2 root root 4096 Feb 12  2025 ben
drwxr-xr-x   2 root root 4096 Nov 15  2023 cdrom
The user ben directory does have an ACL applied which is indicated by the "+" symbol at the end of the permissions mode. To check what they are, run the following:
Code:
$ getfacl -a /media/ben
# file: ben
# owner: root
# group: root
user::rwx
user:ben:r-x
group::r-x
mask::r-x
other::---
The output here is pretty standard and shows that the user ben has read, write and execute permissions for what is mounted. If the output does not look similar for your user, then you can set it with the setfacl command.

Another investigation is to mount the usb manually and see if access to it can be made. For this one can run, as root, a command such as the following:
Code:
mount /dev/sda1 /mnt -o umask=0
The usb is here found to be /dev/sda1 from the output of the lsblk command, and the /mnt directory is a standard directory for temporary mounts. This command sets the umask option to enable all permissions since the commonly used FAT filesystems of usbs don't have any permission capability.

Once mounted manually, one can test access to the usb by copying a testfile to and from it. If this manual procedure works, but mounting in /media doesn't, then one needs to investigate further the permissions including the ACLs. If the manual mounting fails, there may be an issue with the usb itself in this example.

Note that the /media directory is ordinarily owned by root and needn't be altered to be able to read whatever is mounted there.
 
Last edited:
Thank you for your prompt reply
The disk was mounted via USB and at desktop nautalus
I did look at the ls -la of media and saw the following
(Note: It is obvious that I did some ownership,group changes thinking that might allow access)
had to be root to do this

drwxrwxrr-x+ 3 (MyUserId) (MyUserId) 4096 May 12 19:07 .
drwxrwxrr-x 23 root root 4096 Aug 11 12:53 ..
drwxrwxrr-x+ 3 (MyUserId) (MyUserId) 4096 May 15 11:59 (MyUserId)

at root level I did the:
getfacl -a /media/(MyUserId)
getfacl: Removing leading '/' from absolute path names
#file: media/(MyUserId)
#owner: (MyUserId)
#group: (MyUserID)
user::rwx
user::(MyUserId)
group::r-x
mask::rwx
other::r-x

Finally following your example:
I then unmounted the USB drive and did the:
mount /dev/sdb /mnt -o umask=0
and this did allow me to access the contents of the USB mounted drive from my user id desktop
drwxrwxrr-x+ 3 (MyUserId)(MyUserId) 4094 May 12 19:07

Interesting if I did this:
mount /dev/sdb /media/(MyUserId) -o umask=0

The drive appeared as before in nautilus but was again did not allow me to access the contents

The only difference that I saw is that the + was not associated with the /mnt
Is this what I need adjust for /media/(MyUserID) using the setfacl feature

ACL is completely foreign to me
Thanks
 
The permissions on /media with the ACL are the default and do work normally in linux distros and so are not likely to be the issue. There should be no need to alter them, other than experimental purposes.

The fact that access to the usb was available manually means that there's no fundamental issue with the mounting process.

The other variables that exist at first glance are:
the virtualisation aspect of ubuntu;
the nautilus file manager;
automatic mounting.

To check whether the automatic mounting is actually working, after inserting the usb, run the command: findmnt in a terminal and inspect the output. In the following example output snippet shown, the usb partition:
/dev/sda1 has been mounted on /mnt, rather than /media, but in your case it should be on /media/... , but this is what it looks like:
Code:
$ findmnt
<snip>
│ └─/run/credentials/[email protected]       tmpfs          tmpfs       ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap
├─/tmp                                        tmpfs          tmpfs       rw,nosuid,nodev,nr_inodes=1048576,inode64
├─/boot/efi                                   /dev/nvme0n1p1 vfat        rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro
└─/mnt                                        /dev/sda1      vfat        rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-
If the usb happens to be mounted, but nautilus cannot locate it, the problem appears to be with nautilus.

If the usb partition has not been automatically mounted, then you can configure that in gnome. There are a few ways to do it, one of which is using the Disks utility, select the usb, find the mount options and select the one that will mount the usb at start up. I can't give more specific details not having used gnome for some time.

If nautilus appears to be the problem you could try other filemanagers to see whether they behave properly. Other filemanagers include: Thunar, Nemo, PCManFM. There are many others.

In relation to the virtualsation aspect being implicated in this problem, I can't say not having used the sort of virtualisation you have described, so that's one for further research if no other resolution appears.

In relation to ACLs, there's a manual page: man acl, which provides a terse introduction to the matter. There are similarly man pages for getfacl and setfacl. There may be more explanatory expositions online.

In relation to the mounting of a usb, it is only partitions that are mounted, not the raw disk device, so what would actually be mounted is /dev/sdb1 or /dev/sdb2, and not /dev/sdb since /dev/sdb represents the disk device, not a partition. To be able to read a filesystem, one needs to access the partition which holds it.

In relation to presenting of data for readers, as you have wisely done, it's best done using code tags so the exact output is shown in its original format and not distorted and corrupted as the output is in post #3 where the emoji has been introduced. There's info on code tags here: https://www.bbcode.org/how-to-use-bbcode-a-complete-guide.php. Alternatively, in the reply top panel, under the the three vertical dots, is the </> icon which can also be used to place text in code tags.
 
Last edited:
Ospry,

Thank you for your suggestions and help. I have looked into ACL a bit and still have more to do. The issue most likely is based on the Virtual Box layer feature. I have no problem using alternative methods to access USB mounted devices so this is only a matter of convenience. Should I come up with a suitable fix I will certainly post it if I find that it is truly useful to others.

My first introduction to Unix was on a RadioShack Pro (2ea 8inch flooppy) running Pickels&Trout Unix running the Unify Data Base implementation and it progressed from System 5 to Linux.

1prophead
 


Follow Linux.org

Members online


Top