FS#9465 - /tmp has wrong permissions on new installations
Attached to Project:
Arch Linux
Opened by Pierre Schmitz (Pierre) - Monday, 04 February 2008, 16:17 GMT
Last edited by Pierre Schmitz (Pierre) - Friday, 08 February 2008, 10:59 GMT
Opened by Pierre Schmitz (Pierre) - Monday, 04 February 2008, 16:17 GMT
Last edited by Pierre Schmitz (Pierre) - Friday, 08 February 2008, 10:59 GMT
|
Details
When installing Arch (from ftp), /tmp has wrong permissions
which will result in all sorts of problems.
We had a similar issue some time ago (http://bugs.archlinux.org/task/7194). As a workaround the filesystem package sets the right permission on install. This workaround was removed after the bug was fixed in pacman/libarchive. This time the problem does not seem to be pacman nor the filesystem package itself but perhaps the installer. Installing filesystem to another root dir using -r extracts the right permissions. Two things should be done to make our current isos working again: * add chmod 1777 /tmp to the filesystem's install script again OR add the same to the initscripts (should be done asap) * Find the source of this bug and fix it :-) |
This task depends upon
Closed by Pierre Schmitz (Pierre)
Friday, 08 February 2008, 10:59 GMT
Reason for closing: Fixed
Additional comments about closing: I uploaded filesystem-2007.11-7 to [testing].
The source of the problem should be fixed with next isos.
However: we should keep this workaround to avaoid any future regressions.
Friday, 08 February 2008, 10:59 GMT
Reason for closing: Fixed
Additional comments about closing: I uploaded filesystem-2007.11-7 to [testing].
The source of the problem should be fixed with next isos.
However: we should keep this workaround to avaoid any future regressions.
The simplest workaround, of course, is to just create /tmp with the right permissions before doing any pacman related things.
When using core-isos this is corrected with the fix still in "old" filesystem package.
But when using ftp-iso install with current filesystem the permissions of /tmp aren't corrected.
As Tobias says: reusing the old fix should repair also the ftp-iso install.
See
bug 9183.So probably there is an issue in the installer as GerBra said.
http://projects.archlinux.org/git/?p=pacman.git;a=commit;h=801a26805663b0a79bf619a0fec853293806969b
I'd look to the installer for this problem.
So which iso was used, and which pacman version?
The original bug report isn't very clear about that.
However, gerbra was apparently saying the tmp dir might be created even before any pacman related stuff is done.
But well, I don't know.
The /mnt/tmp is created directly after selecting the packages to install and when **download** starts.
At this moment we have /mnt/tmp with 0755 and a /mnt/var.
See PNG here: http://users.archlinux.de/~gerbra/tmp-prob.png
First ls i when dwonload starts, second when base packages are installed.
When filesystem 2007.11-6 gets **installed** after download it seems not to overwrite the complete structure in /mnt/ (the dir structure in filesystem has the right permissions). /mnt/tmp (also /mnt/var/tmp) stays with the bad permissions, also when rebooting. The fix with explicit chmod for those dir's correrted this problem - and do so when using core-iso for current install.
I mean not that the installer is guilty or has a bug: the installer during it's work could live in peace with
a 0755 /mnt/tmp. But the installer created this dir initially (mkdir with current umask).
The problem then is, that no process during configuration or installation in base/core corrected this.
From package side i would prefer filesystem to do this. Or (against further damage on /tmp permissions from
"bad" packages, user mistake,...) we could check&repair it during Runlevel-Skripts.
Let the installer as first action (after preparing harddisk and mount these to /mnt) untar/install the filesystem package. Then we have a good working FHS structure in /mnt/. filesystem is always on core-isos, and we could put it also on ftp-isos.
http://projects.archlinux.org/git/?p=installer.git;a=blob_plain;f=setup;hb=HEAD
And I can't find anything there that is creating $DESTDIR/tmp .
it's the bad combination of pacman 3.0 and the new filesystem package which breaks the ftp install.
Maybe our install iso should upgrade pacman first before doing anything else? That would solve all problems like this for the future.
I: "But the installer created this dir initially (mkdir with current umask)."
I've never looked at the source, but i was sooo sure...
Autoupdates always can cause trouble.