[pacman-dev] tmp permissions problem is back?
See below. Sorry for any split command lines, should be obvious where they are... cheers, Jeremy # pacman -Q pacman libarchive pacman 3.0.5-3 libarchive 2.2.6-1 # mkdir /tmp/pacman.test # pacman -Ud /var/cache/pacman/pkg/filesystem-2007.08-1.pkg.tar.gz --root /tmp/pacman.test # ls -l /tmp/pacman.test total 0 drwxr-xr-x 2 root root 40 2007-07-30 15:52 bin/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 boot/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 dev/ drwxr-xr-x 4 root root 440 2007-07-30 15:52 etc/ drwxr-xr-x 3 root root 60 2007-07-30 15:52 home/ drwxr-xr-x 3 root root 60 2007-07-30 15:52 lib/ drwxr-xr-x 5 root root 100 2007-07-30 15:52 mnt/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 opt/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 proc/ drwxr-x--- 2 root root 40 2007-07-30 15:52 root/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 sbin/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 srv/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 sys/ drwxr-xr-x 2 root root 40 2007-08-20 12:09 tmp/ drwxr-xr-x 10 root root 220 2007-07-30 15:52 usr/ drwxr-xr-x 13 root root 280 2007-08-20 12:09 var/ Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail at http://mrd.mail.yahoo.com/try_beta?.intl=ca
On Mon, Aug 20, 2007 at 12:17:32PM -0400, Mister Dobalina wrote:
See below. Sorry for any split command lines, should be obvious where they are...
Well, it's never really gone : http://bugs.archlinux.org/task/7484#comment17619 What I can't explain and needs to be investigated is why the workaround in post_install doesn't work : # workaround for bug #7194 chmod 1777 var/spool/mail tmp var/tmp
On Mon, Aug 20, 2007 at 06:35:23PM +0200, Xavier wrote:
What I can't explain and needs to be investigated is why the workaround in post_install doesn't work : # workaround for bug #7194 chmod 1777 var/spool/mail tmp var/tmp
That apparently works fine with pacman git though ...
On Mon, Aug 20, 2007 at 10:49:44PM +0200, Xavier wrote:
On Mon, Aug 20, 2007 at 06:35:23PM +0200, Xavier wrote:
What I can't explain and needs to be investigated is why the workaround in post_install doesn't work : # workaround for bug #7194 chmod 1777 var/spool/mail tmp var/tmp
That apparently works fine with pacman git though ...
Ok, you can ignore that, it was stupid. pacman git doesn't use NO_OVERWRITE, so it doesn't need that chmod in post_install for getting /tmp/ permissions right..
--- Xavier <shiningxc@gmail.com> wrote:
On Mon, Aug 20, 2007 at 10:49:44PM +0200, Xavier wrote:
On Mon, Aug 20, 2007 at 06:35:23PM +0200, Xavier wrote:
What I can't explain and needs to be investigated is why the workaround in post_install doesn't work : # workaround for bug #7194 chmod 1777 var/spool/mail tmp var/tmp
That apparently works fine with pacman git though ...
Ok, you can ignore that, it was stupid. pacman git doesn't use NO_OVERWRITE, so it doesn't need that chmod in post_install for getting /tmp/ permissions right..
Sorry, maybe it's my bad -- I'm not installing coreutils in my chroot environment, so the chmod in post_install won't work. Still curious why it worked OK before I upgraded. Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail at http://mrd.mail.yahoo.com/try_beta?.intl=ca
On Mon, Aug 20, 2007 at 06:35:23PM +0200, Xavier wrote:
On Mon, Aug 20, 2007 at 12:17:32PM -0400, Mister Dobalina wrote:
See below. Sorry for any split command lines, should be obvious where they are...
Well, it's never really gone : http://bugs.archlinux.org/task/7484#comment17619
What I can't explain and needs to be investigated is why the workaround in post_install doesn't work : # workaround for bug #7194 chmod 1777 var/spool/mail tmp var/tmp
It looks like scriptlets aren't run when using a different root. scriptlets are called by chrooting first, and then running : execl("/bin/sh", "sh", "-c", cmdline, (char *)NULL); Maybe this requires a proper chroot to work? There is an additional issue in pacman git : 553 snprintf(scriptfn, PATH_MAX, "%s/.INSTALL", tmpdir); 554 /* chop off the root so we can find the tmpdir in the chroot */ 555 scriptpath = scriptfn + strlen(root) - 1; 556 } else { 557 strncpy(scriptfn, installfn, PATH_MAX); 558 /* chop off the root so we can find the tmpdir in the chroot */ 559 scriptpath = scriptfn + strlen(root) - 1; 560 } If I understood correctly, root isn't a prefix anymore, so I believe that this part is wrong now.
On 8/20/07, Mister Dobalina <reebydobalina@yahoo.ca> wrote:
See below. Sorry for any split command lines, should be obvious where they are...
cheers, Jeremy
# pacman -Q pacman libarchive pacman 3.0.5-3 libarchive 2.2.6-1
# mkdir /tmp/pacman.test
# pacman -Ud /var/cache/pacman/pkg/filesystem-2007.08-1.pkg.tar.gz --root /tmp/pacman.test
# ls -l /tmp/pacman.test
total 0 drwxr-xr-x 2 root root 40 2007-07-30 15:52 bin/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 boot/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 dev/ drwxr-xr-x 4 root root 440 2007-07-30 15:52 etc/ drwxr-xr-x 3 root root 60 2007-07-30 15:52 home/ drwxr-xr-x 3 root root 60 2007-07-30 15:52 lib/ drwxr-xr-x 5 root root 100 2007-07-30 15:52 mnt/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 opt/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 proc/ drwxr-x--- 2 root root 40 2007-07-30 15:52 root/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 sbin/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 srv/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 sys/ drwxr-xr-x 2 root root 40 2007-08-20 12:09 tmp/ drwxr-xr-x 10 root root 220 2007-07-30 15:52 usr/ drwxr-xr-x 13 root root 280 2007-08-20 12:09 var/
Did you run this as root? If not, scriptlets and directory permissions could get funky as a regular user doesn't have permission to chroot (to run scriptlets) and/or set some funky permissions on directories, perhaps. -Dan
On Mon, Aug 20, 2007 at 01:05:55PM -0400, Dan McGee wrote:
Did you run this as root? If not, scriptlets and directory permissions could get funky as a regular user doesn't have permission to chroot (to run scriptlets) and/or set some funky permissions on directories, perhaps.
I first tried as user, and then as root ;) It indeed fails to chroot as user.
--- Dan McGee <dpmcgee@gmail.com> wrote:
On 8/20/07, Mister Dobalina <reebydobalina@yahoo.ca> wrote:
# pacman -Q pacman libarchive pacman 3.0.5-3 libarchive 2.2.6-1
# mkdir /tmp/pacman.test
# pacman -Ud
/var/cache/pacman/pkg/filesystem-2007.08-1.pkg.tar.gz
--root /tmp/pacman.test
# ls -l /tmp/pacman.test
total 0 drwxr-xr-x 2 root root 40 2007-07-30 15:52 bin/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 boot/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 dev/ drwxr-xr-x 4 root root 440 2007-07-30 15:52 etc/ drwxr-xr-x 3 root root 60 2007-07-30 15:52 home/ drwxr-xr-x 3 root root 60 2007-07-30 15:52 lib/ drwxr-xr-x 5 root root 100 2007-07-30 15:52 mnt/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 opt/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 proc/ drwxr-x--- 2 root root 40 2007-07-30 15:52 root/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 sbin/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 srv/ drwxr-xr-x 2 root root 40 2007-07-30 15:52 sys/ drwxr-xr-x 2 root root 40 2007-08-20 12:09 tmp/ drwxr-xr-x 10 root root 220 2007-07-30 15:52 usr/ drwxr-xr-x 13 root root 280 2007-08-20 12:09 var/
Did you run this as root? If not, scriptlets and directory permissions could get funky as a regular user doesn't have permission to chroot (to run scriptlets) and/or set some funky permissions on directories, perhaps.
-Dan
All commands were run as root. The reason I sent the original message is that a few days ago this problem wasn't happening, but after a recent update it started. I noticed it because I use the --root option to set up a quick'n'dirty tmpfs chroot environment from a small set of base packages, all from a script. The problem is obviously very easy to chmod around in the script, but just wanted to let you know that this had suddenly popped up. Cheers, Jeremy Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail at http://mrd.mail.yahoo.com/try_beta?.intl=ca
participants (3)
-
Dan McGee
-
Mister Dobalina
-
Xavier