Debian /tmp permissions (or "I will not untar an archive as root directly in /tmp")
Posted Jun 22 2011, 11:38 by William Shallum [updated Jun 22 2011, 11:47]
The proper permissions for /tmp are root:root 1777 (drwxrwxrwt). Inadvertently setting it to 755 will cause X not to start as a normal user (among other problems).
My problem was caused by untar-ing a data.tar.gz from a Debian package directly in /tmp. The tarball contains an entry for “.” thus it changed the permissions on /tmp when untarred.
# gzip -dc < data.tar.gz | tar -tvf -
drwxr-xr-x root/root 0 2010-12-12 04:59 ./
Above: the culprit