Permission denied to remount tmp for exec
I'm running Fedora Linux on MediaTemple using their (ve) virtual Linux box. Pretty much a clean install (Linux ************ 2.6.18-028stab089.1 #1 SMP Thu Apr 14 13:46:04 MSD 2011 x86_64 x86_64 x86_64 GNU/Linux).
I'm trying to do some Pear installs and need /tmp
to be remounted with exec
option. No problem, right? So I'm running as root
and I just go for it:
[root@host ~]# mount -o remount,exec /tmp
mount: permission denied
[root@host ~]#
Well, this is rather unexpected. MediaTemple support doesn't provide any assistance with this--it's not in the SLA. Given that this is a pretty vanilla setup, perhaps someone out there has an idea what's wrong here?
EDIT:
Here's some additional information. Running mount
shows this:[root@host ~]# mount
/dev/vzfs on / type reiserfs (rw,usrquota,grpquota)
/dev/simfs on /tmp type simfs (rw,noexec,relatime,usrquota,grpquota)
/dev/simfs on /var/tmp type simfs (rw,noexec,relatime,usrquota,grpquota)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /dev type tmpfs (rw,relatime)
none on /dev/pts type devpts (rw,relatime)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
[root@host ~]#
The contents of /etc/fstab
is:
none /dev/pts devpts rw 0 0
Next I tried adding this line to /etc/fstab
:
/dev/simfs /tmp simfs rw,exec,relatime,usrquota,grpquota 0 0
Then running mount /tmp
results in:
mount: unknown filesystem type 'simfs'
I'm a little confused as to how simfs
is listed when you run mount, but when you add it to /etc/fstab
it isn't recognized. Nonetheless, this doesn't seem to solve my issue, so I'm still stuck. Any ideas?
UPDATE 6/25/11
@jamiers has found a workaround that MediaTemple posted (see below). However, I'm now wondering about the more fundamental aspect of this problem. Why is it that you can't remount tmp with different options in a virtual environment? From what I can tell, there's nothing inherently restrictive in a virtual environment that would prevent you from doing something like that. Does anyone have an idea why this is the case?
Solution 1:
I have had the same trouble while trying to install PHP APC. I followed the instructions at the bottom of this guide: https://kb.mediatemple.net/questions/1987/Noexec+and+%7B47%7Dtmp+Troubleshooting#ve about creating a chrooted environment.
Hope this helps!