Cannot attach file from software RAID to an email

Last week I upgraded from LTS 22 to 24.04.3 and initially encountered no problems -- until yesterday I tried to attach a file to an email in Thunderbird (latest snap 140.5). Turns out the same problem occurs on the Gmail website in Firefox (snap 145.0). After more testing I narrowed it down to the type of file system that the file resides on, as unlikely as that sounds.

In the Attach file dialog, browse to the desired directory and double-click the desired file. If on a regular file system (e.g. /home/, /tmp, /var -- anything on /dev/sd) then the file is attached to the draft mail in both TB and Gmail, and can be sent.

If the file is on my software RAID (/dev/md0, mounted on /mnt), then the double-click is ignored by both programs. The type of file doesn’t matter, it’s the same for .txt, .pdf, office-types, images, etc. The file just isn’t attached. An error is syslogged for the TB attempt:

Dec 10 12:21:04 xymphum thunderbird_thunderbird.desktop[720728]: JavaScript error: chrome://messenger/content/messengercompose/MsgComposeCommands.js, line 8067: NS_ERROR_FILE_NOT_FOUND: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIFile.fileSize]

(No logging of the attach failure on Gmail, naturally.)

Does anyone know how to resolve this?

I don’t know how attaching work under the hood, but in searches I came across xdg-* packages possibly being involved with this process. The ones the LTS upgrade placed/updated on my system are:
xdg-dbus-proxy, xdg-desktop-portal, xdg-desktop-portal-gtk, xdg-user-dirs, xdg-user-dirs-gtk, xdg-utils

While I have a workaround (copy the file to attached from RAID to regular disk), it would better if attaching just worked again everywhere. Thanks.

1 Like

Hi, @Xymph and welcome to the Ubuntu MATE Community!

The first thought is that snapped application has limited access to mounted volumes.

They say, sudo snap connect <snap-name>:removable-media command might help.

Another/extra option is to mount volume in question at directory within one's home dir.

Good luck!

2 Likes

Doesn’t sound unplausible, but it doesn’t help for TB (closed it, ran the command, started TB but attaching is still ignored as before).

And Firefox was already a snap package in LTS 22, when I didn’t have this attaching problem in TB nor Gmail.

Mounting my RAID elsewhere is a very undesirable approach, sorry. Thanks anyway.

1 Like

By undesirable, I was thinking of /home/[user]/.mnt/ or somesuch.

But I (finally) got around to testing this idea as yet, and it actually works. :+1:
So instead of a user subdirectory, I created /home/data/ as a mount point (without an actual ‘data’ user), and put the RAID there. This also allows attaching in both TB and Gmail.

So thanks to @ugnvs for the tip!

4 Likes