Random Notes‎ > ‎

Debian /tmp permissions (or "I will not untar an archive as root directly in /tmp")

posted Jun 22, 2011, 4:38 AM by William Shallum   [ updated Jun 22, 2011, 4:47 AM ]
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
Comments