Seems like a bug in uwt. One that was never noticed by anyone. Perhaps because in Whonix, uwt first runs as user while in qubes-whonix it first runs as root. Setting ownership to user:user is a limited workaround. Would fail as soon as other user accounts start using uwt. Needs a fix in uwt.
Related to these ~20 lines of code:
The following code is non-ideal.
if [ ! -d "/tmp/uwt" ]; then
mkdir --parents --mode=g+rw "/tmp/uwt"
fi
[hr]
Background:
What’s uwt good for anyhow?
torsocks has no options for passing ip/port by command line [for stream isolation]. Neither an option to pass a config file by command line. The only option to set a configuration file is setting the TORSOCKS_CONF_FILE environment variable. (upstream feature request)
uwt dynamically generates a torsocks config file and sets that environment variable. The problem with that approach was a massive amount of tmp.xxx files piling up /tmp where users wondered about. Therefore a sub folder /tmp/uwt was created to aggregate all those config files there. Why wasn’t the config file deleted? Because ‘torsocks’ was called by using ‘exec’ and there is no way to cleanup after.
[hr]
I attempted a fix. Abolished use of exec. No longer using a sub folder. Temporary torsocks configuration files are now cleaned up by an EXIT trap.
[hr]
Long story short:
Should be fixed in uwt >= 1.7-1.
Hopefully not more issues were introduced than fixed. Needs testing.
In Whonix 11.0.0.2.2-developers-only (not yet tested) from
the following can be deleted.