[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

apt - remount exec



Ich habe gerade das cyrus update eingespielt. Bei einer etch box ist das
 dir wie folgt gemountet. Die Rechte sind 0777.

rw,noexec,nosuid,nodev

Ich habe laut dem debian Artikel in der 70conf bei apt folgendes gesetzt:

DPkg::Pre-Invoke{"mount -o remount,exec /tmp";};
DPkg::Post-Invoke {"mount -o remount /tmp";};

Meines Erachtens hat apt also vor apt-get upgrade das tmp dir wie folgt
gemountet:

rw,nosuid,nodev

Trotzdem hat das Upgrade von cyrus den Fehler gebracht, das im tmp dir
nichts ausgeführt werden konnte.

Liegt das an dem nodev?

Bei anderen etch boxen, wo kein nodev ist hats bis jetzt funktioniert.

Muss ich obiges eigentlich in einer 50conf schreiben, da in der 70conf
noch etwas anderes steht?

DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";};


das tmp dir der betroffenen box liegt auf einer eigenen Partition, die
in er vm eingebunden ist im Gegensatz zu anderen vms, wo ich das tmp dir
 , als loop angelegt habe, also ohne eigene Partition.



/dev/sda2 on / type ext3 (rw,errors=remount-ro,usrquota)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/sda3 on /tmp type ext2 (rw,noexec,nosuid,nodev)


fstab

proc            /proc           proc    defaults        0       0
/dev/sda1 none swap sw 0 0
/dev/sda2 / ext3 errors=remount-ro,usrquota 0 1
/dev/sda3 /tmp    ext2    defaults,nosuid,noexec,nodev    0    2

mount -o remount,exec /tmp

/dev/sda2 on / type ext3 (rw,errors=remount-ro,usrquota)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/sda3 on /tmp type ext2 (rw,nosuid,nodev)

mount -o remount /tmp

/dev/sda2 on / type ext3 (rw,errors=remount-ro,usrquota)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/sda3 on /tmp type ext2 (rw,noexec,nosuid,nodev)


xxx:~# ls -al /tmp
total 44
drwxrwxrwx  5 root     root      4096 Sep  7 20:33 .
drwxr-xr-x 22 root     root      4096 Sep  6 09:02 ..
drwxrwxrwt  2 root     root      4096 Sep  6 06:31 .ICE-unix
drwxrwxrwt  2 root     root      4096 Sep  6 06:31 .X11-unix
-rw-r--r--  1 www-data www-data 11596 Sep  6 21:36
20090906-213630-2ZzCkE6KWQUAAAkFFGwAAACS-file-AXygRz
srwx------  1 root     root         0 Sep  6 06:31 fail2ban.sock
drwx------  2 root     root     16384 Sep  5 14:52 lost+found

:~# df -h /tmp
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3             3.0G  4.6M  2.8G   1% /tmp


Holm




Reply to: