Can't change default download folder from /run/user on Linux

Description of the issue:

Using Brave on Ubuntu 20.04 LTS, when I select “home” (/home/sean) as my default download folder, Brave changes this to “/run/user/1000/doc/33d63c81/sean”

Then when I actually right-click a file to save it, I have to navigate to the location I want in my home folder.

I can’t put my finger on when this started, but downloads had been working correctly previously (maybe before I upgraded Ubuntu to 20.04).

How can this issue be reproduced?

Go to settings/downloads, click to change folder and select literally any folder.

Expected result:

I expect the folder to change to the one I select and not something in /run/user which is ephemeral and created by pam_systemd.

Brave version

Version 1.30.87 Chromium: 94.0.4606.71 (Official Build) (64-bit)

Additional Information:

OS version: Ubuntu 20.04.3 LTS

I found the following on GitHub under a different project (Flameshot) where users were complaining of the same behavior under 20.04, I think from their developer:

"Okay the root cause is the interaction between gnome file manager and Qt’s QFileDialog. If I used a Qt file prompt instead of the native dialog box, this issue (and other issues) go away. Here is a similar issue from another project: OPM/ResInsight#6345

Unfortunately this means I need to disable the native dialogs for file saving which makes the theme ugly."

Thread here:

Does anyone look at these? Is there a different place (or different set of tags) where I should have posted this?

I think you’re in the right place; unfortunately the responsiveness to Linux issues seems lower, maybe because there’s fewer users and combined with so many permutations on the Linux platform that it can be difficult to sort everything out. You’ve got the various OS distributions, various installation methods (Snaps, Flatpaks, OS-provided packages, official instructions, on and on), so many changes within each distro, etc. – it can be hard to keep up.

Anyway all that aside, I tried reproducing on a 21.10 VM using Brave 1.31.87 and I don’t see the issue occurring there.

How did you install it? I’m not as familiar with Snaps but it looks like that’s the default installation path for Ubuntu, did you do it using their pkg manager or thru some other means?

What do you get from the following?

which brave

and (with Brave running)

for pid in $(pidof brave); do ls -l "/proc/$pid/cwd"; done

Thank you for responding.

I installed Brave directly from the Software Center (gui on Ubuntu).

which brave returns

for pid in $(pidof brave); do ls -l “/proc/$pid/cwd”; done returns
lrwxrwxrwx 1 sean sean 0 Oct 30 11:01 /proc/18445/cwd → ‘/proc/18341/fdinfo (deleted)’
lrwxrwxrwx 1 sean sean 0 Oct 30 11:01 /proc/18424/cwd → ‘/proc/18341/fdinfo (deleted)’
lrwxrwxrwx 1 sean sean 0 Oct 30 11:01 /proc/18406/cwd → ‘/proc/18341/fdinfo (deleted)’
lrwxrwxrwx 1 sean sean 0 Oct 30 11:01 /proc/18399/cwd → ‘/proc/18341/fdinfo (deleted)’
lrwxrwxrwx 1 sean sean 0 Oct 30 11:01 /proc/18381/cwd → ‘/proc/18341/fdinfo (deleted)’
lrwxrwxrwx 1 sean sean 0 Oct 30 11:01 /proc/18375/cwd → /home/sean
lrwxrwxrwx 1 sean sean 0 Oct 30 11:01 /proc/18367/cwd → /home/sean
lrwxrwxrwx 1 sean sean 0 Oct 30 11:01 /proc/18362/cwd → /home/sean
lrwxrwxrwx 1 sean sean 0 Oct 30 11:01 /proc/18342/cwd → ‘/proc/18341/fdinfo (deleted)’
lrwxrwxrwx 1 sean sean 0 Oct 30 11:01 /proc/18340/cwd → ‘/proc/18341/fdinfo (deleted)’
lrwxrwxrwx 1 sean sean 0 Oct 30 11:01 /proc/18339/cwd → /home/sean
lrwxrwxrwx 1 sean sean 0 Oct 30 11:01 /proc/18329/cwd → /home/sean

(Sorry for the mess; I closed Brave and relaunched but all this cruft is still lying around.)

I installed from the Software Center just because it was quick and easy (and I had a lot of things to iron out after upgrading to 20.04), but I am more than happy to install via a different method. I have no great love for snap.

Thanks for any light you can shed.


OK, that’s the same as I get on my 21.10 VM. And the CWD (current working directory) looks like it’s your homedir which seems normal.

Are you just launching the browser with the GNOME button, or from the shell, or anything custom or unusual?

Are the rest of your OS packages up to date? Could maybe try updating everything and rebooting, if you haven’t already done that.

I’ll have to think about it and see if I can come up with any other ideas, nothing really jumping out at me rn.

What about realpath ~ ?

Do you have any extensions installed? If so, can you try disabling them?

Does the same issue occur in a Private window, and/or a new profile?

This happens no matter how I launch, but normally I launch from the “launcher” bar down the left side of the screen.

I keep my system 100% up to date, except I prefer to stick to LTS releases rather than the interim releases.

I did include a report of an identical issued under 20.04 with a completely different software package in my initial post. So this appears not to be an isolated problem.

realpath - returns

This happens regardless of extension status (tried that already) and in private windows. I have not tried the new profile trick, but I expect it will change nothing. I will give it a try and let you know.


OK, so, interestingly, the problem did not return in the “new profile.”

That gives me more leads to pursue, but if you have a suggestion I am all ears. Perhaps instead of just disabling my extensions I need to delete them altogether?


Hrm, frankly, I didn’t expect that either.

You could try removing them, they should be easy enough to put back after if you do. Again I don’t expect it to be the root issue since disabling them didn’t seem to do it, but we’re already been surprised once. :slight_smile: So worth a shot I think.

Removing extensions did not help, and also, I spoke too soon.

When I created a new profile, it came up with my download folder as being /home/Downloads, and I tested a download, and all was fine. EXCEPT:

Just now I thought to go into that profile, and change the download folder. As soon as I did that (and I just changed from Downloads to desktop), it immediately changed to:
… and now I am back where I started; nothing I do in the new profile will move it out of /run/user/1000/doc/cb1b51af/

So it seems this crops up in the code that changes the default save path.


Also, FWIW, I went into the new profile and did a “reset settings” and that did not fix the corrupted download folder. It’s stuck in /run


OK. I was hoping we’d get it working as-is esp. considering 21.10 seems OK, but it’s not panning out. And the bug you linked sure as heck does look an awful lot like this issue. Per the comments in that report, that particular issue seems specific to Snap packaging of that app, maybe the same is true here.

I wonder if your best bet at this point would be to just use Brave’s official Linux install instructions here.

They do say “You can find Brave on the Snapcraft Store, but while it is maintained by Brave Software, it is not yet working as well as our official packages. We currently recommend that users who are able to use our official package repositories do so instead of using the Snap.” And there’s a bunch of specific bugs listed, none of them seems to be this one. Want to give that a shot though? Seems like the Snap package is much more likely to be problematic in many ways.

Sure, I am game to try the “official” install. I bypassed those instructions because they seemed to top out at 16.04. I assume once I load the repositories it will all load correctly. I need to back up all my settings first (and I am going to lose my “ads blocked and timed saved” totals, again!) and for good measure I will uninstall the snap version first, so this will have to wait a day or so. I will post my findings here.

Sounds good, thanks. Btw it’s ‘16.04+’ so I think it’s intended to be used from there forward, and not backward.

1 Like

This is definitely a snap issue. I installed it on Ubuntu 20.04 and 21.04, never had the problem you experience. Just get rid of the snap. and install it properly from brave’s installation site. Canonical is pushing snaps in the software store but it is a half baked technology, aside from being bloated and slow a lot of apps are crippled installed that way because they don’t have very fine grain way to control the sandboxing and access. In comparison flatpak does a better job IMO.

1 Like

OK, so, as you suggested, this problem does not exist in the “official” version from the repository. As a side note I was able to successfully preserve my settings by backing up my profile folder. That, of course, restored the weird default download folder, but then I was able to change it.

So it should be noted here that going to the Ubuntu Software Center and selecting Brave for installation, which is what I did when I migrated to a new laptop, apparently installs the Snap version. As kmod wrote, it would appear that Canonical is pushing this. That puts a lot of users who just want to get work done and have a relatively simple way to install apps at a serious disadvantage, especially if this type of obscure issue is going to be the result. I know I should be ranting at Canonical about this, but as long as I am typing …

If Brave is seeking greater user-base penetration, having the version that works out of the box in the software store would seem to be a reasonable goal. Asking end users to ignore a version in an app store, and instead issue a bunch of privileged terminal commands to install a browser is a reach. I’m a Twenex hack, from the paleolithic era, so for me it’s NBD, but that’s not true for lots of folks for whom migration to even a friendly flavor of Linux like Ubuntu is a stretch in the first place. /end rant

Thanks for your help.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.