Audacity only accepts '/var/tmp/' for temp files - but there is not enough space on that partition

I have Audacity 2.2.1 on Ubuntu 18.04.3. LTS. I think I simply installed it from the standard repository.
I have all my data on an NTFS partition, and all my Ubuntu software write files there every day.
There is only little space on the Ubuntu root-partition. Therefore I can’t use “/var/tmp/.audacity_temp/” for temp files.
But when I try to select another temporary files folder (on the NTFS-partition) in Audacity Edit → Preferences → Directories Audacity wouldn’t start.
I have searched on this forum, but I only found information that either seems too old or not about this exact situation.

Is that because you have a dual boot system and you need to access the data from Windows?

Is this partition on the same physical disk as the root partition?

Yes. (Although I hardly ever use Windows anymore.)
But mainly because it has always been a principle of mine to have the OS on one partition and all the data (including temp files) on another partition.


The best solution would be to repartition the drive so that you have an NTFS partition big enough for your Windows stuff, and an ext4 partition for your normal Linux data. I totally understand that you may want to put off doing that until next time you do a major update.

I think it “should” be possible to do what you want, assuming that the NTFS partition is mounted at boot time (the NTFS partition must be mounted before you launch Audacity). The path you need to enter goes via the mount point, which is probably something like:

I understand that a linux-enthusiast would want me to have my data on a linux-partition. But since Audacity is the only program I have ever encountered, that has any problem with my NTFS-partition, I have no plans for repartitioning everything.

My NTFS-partition has never ever been unmounted…
So my question is why Audacity has a problem when no other linux software has any problems at all.
This is the path I want to use: “/mnt/4AF15A0435E762B4/Audacity-projects/” (+ any specific folder name that Audacity needs for whatever strange reason).
I look forward to a solution.

What do you get if you run this command in a Terminal window?

ls -la /mnt/4AF15A0435E762B4/

I get this:

henrik@Henrik-L570:~$ ls -la /mnt/4AF15A0435E762B4/
total 213
drwxrwxrwx 1 root root 8192 okt 24 11:17 .
drwxr-xr-x 3 root root 4096 mar 19 2018 …
drwxrwxrwx 1 root root 8192 sep 24 18:27 ‘Åbne kontofiler’
drwxrwxrwx 1 root root 4096 okt 24 12:27 Audacity-projects
drwxrwxrwx 1 root root 0 okt 24 11:34 .audacity_temp
-rwxrwxrwx 2 root root 324 feb 12 2018 ‘Cd-drev - Genvej.lnk’
drwxrwxrwx 1 root root 0 maj 1 2018 Chrome-Profiles
drwxrwxrwx 1 root root 0 feb 11 2018 CopernicSearchIndex
drwxrwxrwx 1 root root 8192 sep 17 21:51 DataBackup
drwxrwxrwx 1 root root 40960 sep 25 16:04 DataDoc
drwxrwxrwx 1 root root 4096 aug 2 20:42 Downloads
drwxrwxrwx 1 root root 4096 okt 16 16:39 ‘Downloads Ubuntu’
drwxrwxrwx 1 root root 28672 aug 3 11:52 ‘Downloads Windows’
drwxrwxrwx 1 root root 0 feb 2 2018 Firefox-Profiles
drwxrwxrwx 1 root root 77824 jun 25 2018 found.000
drwxrwxrwx 1 root root 4096 feb 23 2019 found.001
drwxrwxrwx 1 root root 0 aug 3 2016 ‘HP Universal Print Driver’
drwxrwxrwx 1 root root 4096 jan 26 2018 MapData
drwxrwxrwx 1 root root 4096 okt 24 11:02 ‘Paragon backups’
drwxrwxrwx 1 root root 0 feb 11 2018 ‘$RECYCLE.BIN’
drwxrwxrwx 1 root root 0 okt 12 2016 ‘SugarSync problemer IGEN’
drwxrwxrwx 1 root root 4096 feb 22 2019 ‘System Volume Information’
drwxrwxrwx 1 root root 4096 sep 28 11:28 Temp
drwxrwxrwx 1 root root 4096 sep 28 10:29 ‘Wallets og backups fra Home’
drwxrwxrwx 1 root root 0 jan 26 2018 WindowsApps
drwxrwxrwx 1 root root 4096 okt 24 21:00 xapiandb

Are you running your computer as root?

To be perfectly honest: I am not sure.

Open a terminal window and enter the (lowercase) letter “w”


What is the output?

Also this command:


What is the output?

Yes, sir! Here comes the output:

henrik@Henrik-L570:~$ w
12:07:18 up 2 days, 21:15, 1 user, load average: 1,80, 1,55, 1,56
henrik :0 :0 tir14 ?xdm? 3:40m 0.04s /usr/lib/gdm3/gdm-x-session --run-script env GNOME_SHE
henrik@Henrik-L570:~$ groups
henrik adm cdrom sudo dip plugdev lpadmin sambashare

OK, so you have access to “sudo”, but you’re not running as “root” (as it should be).

What this says is that:

  • Your NTFS partition is owned by “root”.
  • For all folders in that partition, read + write + execute permissions are enabled for everyone. From a security point of view, that’s bad as it gives permission to the whole world to read, write or run any file on that partition, but probably necessary because Windows doesn’t have a proper permissions system like 'nix.
  • The parent folder (indicated by two dots) is set with “read + write + execute” permissions for the owner (“root”), “read + execute” for execute for everyone else.

Normally on a single user system, the partition would be mounted with the current user as the owner, and files written to the partition would then be owned by that user.

What do you get from:

ls -la /mnt/4AF15A0435E762B4/Audacity-projects/

OK. Thank you for pointing that out. I can see, that is not optimal!

Let me try the ‘code’-tag here:

henrik@Henrik-L570:~$ ls -la /mnt/4AF15A0435E762B4/Audacity-projects/
total 136
drwxrwxrwx 1 root root  4096 okt 24 12:27  .
drwxrwxrwx 1 root root  8192 okt 24 11:17  ..
drwxrwxrwx 1 root root     0 okt 24 11:24  audacity-henrik
drwxrwxrwx 1 root root     0 okt 24 11:16  .audacity_temp
drwxrwxrwx 1 root root     0 okt 24 12:27  audacity_temp
-rwxrwxrwx 1 root root 35037 jun 28  2018 'Henrik - Session med Angelika AFTER cut sections.aup'
drwxrwxrwx 1 root root     0 jun 28  2018 'Henrik - Session med Angelika AFTER cut sections_data'
-rwxrwxrwx 1 root root 87160 jun 28  2018 'Henrik - Session med Angelika.aup'
drwxrwxrwx 1 root root     0 jun 25  2018 'Henrik - Session med Angelika_data'

You can see the folders I have created while trying to get Audacity to work.

Nice :slight_smile: Much more readable.

I’ve never tried running Audacity like this, but I imagine that it could be a problem because Audacity runs with your user permissions, and expects it’s temp folder to be owned by the same user. Audacity does have permission to read and write in that folder (as does everyone else), but Audacity’s Temp folder is “special” and should be owned by the user.

A possible workaround that doesn’t involve changing your partitions, is:

  1. Launch Audacity
  2. “File menu > Save Project As…” and save the empty project to the NTFS partition.
    Audacity will now use the “_data” folder on the NTFS partition for it’s temp files, and only the “lock file” will use /var/tmp/
    You would need to do this each time you start a new project.

OK. That wouldn’t be too complicated. :slight_smile:
But if I understand you correct the right solution would be to make me ‘henrik’ the owner of the NTFS-partition instead of ‘root’. And to change/reduce some permissions.
But would that prevent Windows 10 from using it?

What I would do, would be to resize your current partitions to make room for another partition (or add another drive). Keep an NTFS partition for Windows, and add a new ext4 partition for Linux data. If any of that “Linux” data is also required on Windows, then you can still use the NTFS partition as now.

My own system is similar to the above. I have my HOME directory in a separate partition, and Windows installed in an NTFS partition.

Windows can’t access an ext4 partition.

I have always kept data and OS on separate partitions, because they need very different backup methods.
I don’t have “Linux data” and “windows data”… I just have data, so putting them on an ext4 linux partition that Windows cannot read is not very practical.

Personally I rarely use Windows these days (only for testing Audacity), but if it suits you better, you could make a partition specifically for Audacity’s temp folder, or just use the workaround that I suggested previously.