A simple fix when /tmp is too small and you can’t download a file in Firefox
Firefox Problem
Recently using my FreeBSD desktop, I was unable to download a file in Firefox.
There is not enough room on the disk o save /tmp/IVpWYcrD.exe.part.
Remove unnecessary files from the disk and try again, or try saving in a different location.
So I got this as soon as I tried to download a file. It said there wasn’t enough space to download the file and recommending a different location, however, this error was before I even chose a download location.
Cause
So it appears it starts downloading immediately to /tmp, but since I installed FreeBSD without giving /tmp its own partition, it was dumped in the root partition, which doesn’t have much space.
Here are the partitions I have created.
[jared@slc-jab ~]$ df -aH Filesystem Size Used Avail Capacity Mounted on /dev/label/rootfs0 520M 259M 219M 54% / devfs 1.0k 1.0k 0B 100% /dev /dev/label/var0 1.0G 164M 791M 17% /var /dev/label/usr0 143G 80G 51G 61% /usr procfs 4.1k 4.1k 0B 100% /proc
So using Firefox as soon as I try to download anything over 219 MB, it would fail.
My first bad idea to fix this (Don’t do this!)
So the fix seemed simple. However, while this resolved the Firefox issue, this fix caused some problems with Xorg and KDE.
As root, I did this:
mkdir /usr/tmp
chmod 1777 /usr/tmp
ln -s /usr/tmp /tmp
I made sure that the /usr/tmp permissions look as follows: rwxrwxrwt. Yes, that is supposed to end with a ‘t’. Read this for more info: http://www.freebsd.org/doc/handbook/permissions.html
If you screw up your permissions for the /usr/tmp file, Firefox will likely let you know with the following error.
/tmp/LDVDKpa.exe.part could not be saved, because you cannot change the contents of that folder.
Change the folder properties and try again, or try saving in a different location.
So I got the permission issue fixed and then rebooted to try to fix the fact that no other windows would open because I switched the /tmp directory while in X and after that none of my windows would open.
However, when I rebooted, I got this error with kdm and it kdm didn’t start:
Nov 9 09:07:12 slc-jab kdm_greet[1576]: Cannot create $HOME
Nov 9 09:07:12 slc-jab kdm-bin: :0[1575]: Received unknown or unexpected command -2 from greeter
Nov 9 09:07:12 slc-jab kdm-bin: :0[1575]: Abnormal termination of greeter for display :0, code 1, signal 0
I tried to fix the KDE issue, but it seemed to be caused by the fact that /tmp was a link because /usr/tmp had proper permissions but still it didn’t seem to work.
My second bad attempt
I spent hours trying to find a way to change the temp directory in about.config and thought I had it with browser.cache.disk.parent_directory but alas, it never worked.
- Leave /tmp as it is.
- Create another temp directory:
mkdir /usr/tmp - Give it the correct permissions.
chmod 1777 /usr/tmp - Open Firefox.
- For the URL type: about:config
- Add a new string
Name: firefox
Value: /usr/tmp - Restart Firefox.
My third attempt
I tried to create a TEMP environment variable. In fact, if Firefox is launched from a shell with TEMP specified as ~/.tmp then it works. However, when the KDE Menu launches Firefox, it never has that environment variable. I added the environment variable to .profile, .cshrc, and rebooted, but it never worked.
Resolution
I added this line to my /etc/fstab file and rebooted. That took care of it. Supposedly tmpfs is experimental, but it is working great.
tmpfs /tmp tmpfs rw,mode=1777 0 0
Anyway, I hope this information helps you if you see this issue.
your good -- that fixed same $HOME problem I had with my Gentoo 11.2 livedvd install to drive. i after I did emerge and some package updates, something must got screwed up cuz then i was getting that $HOME create error. (that /tmp line is not part of the steps for doing a dvd to hard disk install)
thanks!!
well.. so i booted partially into GUI, then locked up (just the GUI)..
guess theres other things