Re: Bad permissions on /tmp
On 4 Jan 2000, Brian May wrote:
> >>>>> "Joey" == Joey Hess <joeyh@debian.org> writes:
>
> >> So ... the conclusion is that you must never dpkg-deb -x a
> >> source file into /tmp, as root (or any other place where you
> >> don't want the permissions to be changed). If so, this sounds
> >> like a serious "gotcha" that is rather unexpected.
> >>
> >> However, I thought most (if not all) source tar files never
> >> contain the ./ directory, so I am puzzled as how it could
> >> happen.
>
> Joey> dpkg-deb -x acts on .deb files; _all_ .deb files contain a
> Joey> . directory.
>
> Ooops! I thought that was "dpkg-source". Still, it is something a
> don't particular like, and as I infrequently use dpkg-deb -x, it could
> really catch me by surprise and damage permissions, as illustrated
> in this thread.
>
> However, after thinking about it, I am not sure there is any easy way
> to "fix" the problem. eg, even if an option was used to tell tar not
> to extract ./ (is this possible? anything seems possible with gnu
> tar!) - I probably wouldn't remember to use it ;-).
Never use /tmp to un-anything files would be one solution.
You should never really do anything in /tmp without first creating a
temporary directory (/tmp/scratch, say) and chmodding it.
Jules
/----------------+-------------------------------+---------------------\
| Jelibean aka | jules@jellybean.co.uk | 6 Evelyn Rd |
| Jules aka | jules@debian.org | Richmond, Surrey |
| Julian Bean | jmlb2@hermes.cam.ac.uk | TW9 2TF *UK* |
+----------------+-------------------------------+---------------------+
| War doesn't demonstrate who's right... just who's left. |
| When privacy is outlawed... only the outlaws have privacy. |
\----------------------------------------------------------------------/
Reply to: