It would, but you would also need to do some more things. The default permissions of /tmp
are this:
# stat /tmp
...
Access: (1777/drwxrwxrwt) Uid: ( 0/ root) Gid: ( 0/ root)
Since the permissions of the link are the permissions of the target, you will have to change the permissions of ~/tmp
. At the least, it should be world-readable and -writable:
chmod a+rwx ~/tmp
The t
bit should also be set (see What is the "t" letter in the output of "ls -ld /tmp"?):
chmod +t ~/tmp
There might be other problems. If any directory in the path for ~/tmp
doesn't have execute bit set for others, this folder will be inaccessible for most users.
I missed the obvious flaw in this:
Any attempt to use /tmp
before your home directory is available will fail.
This might be one place where bind mounts are better than links.
/tmp
to/home
or do you want to create a new partition on you HDD for/tmp
. Many set ups have their/tmp
directory entirely in main memory on a tmpfs file system by the way, since there's nothing in there that needs to survive a reboot./var/tmp
symlinked to/tmp
(luckily without problems so far). In my setup/var
and/home
are entirely on HDD, while the rest of/
is on SDD.