Tiny Core Linux
Tiny Core Base => TCB Bugs => Topic started by: hiro on January 26, 2013, 03:44:39 PM
-
mounting works fine as user tc, but unmounting not.
from fstab:
/dev/sdb1 /mnt/sdb1 vfat noauto,users,exec,umask=000 0 0 # Added by TC
$ umount /mnt/sdb1/
umount: can't umount /mnt/sdb1: Operation not permitted
-
I noticed that too, so I started prefixing umount with sudo.
-
tc@box:~$ sudo mount /dev/sda1
tc@box:~$ sudo mount /dev/sda3
tc@box:~$ sudo mount /dev/sda5
tc@box:~$ sudo umount /dev/sda1
tc@box:~$ sudo umount /dev/sda3
tc@box:~$ sudo umount /dev/sda5
tc@box:~$
-
I've looked into mtab and it seems the users flag is missing there. I know nothing about the technical details so I ask here. A bug or just some new kernel "feature"?
-
It would seem that busybox is ignoring its own configuration file, as in the past, it always worked.
sudo cat /etc/busybox.conf
-
oh, wow, yet an other place for this?
why isn't the users flag in fstab the only one to decide?
-
I'm also experiencing this same issue with Core 4.7.3
tc@box:~$mount /mnt/sdc1
tc@box:~$umount /mnt/sdc1
umount: can't umount /mnt/sdc1: Operation not permitted
tc@box:~$sudo cat /etc/busybox.conf
# /etc/busybox.conf: Busybox configuration file.
#
[SUID]
# Allow command to be run by anyone.
mount = s-x root.root
umount = s-x root.root
tc@box:~$cat /etc/fstab | grep sdc1
/dev/sdc1 /mnt/sdc1 vfat noauto,users,exec,umask=000 0 0 # Added by TC
tc@box:~$ cat /etc/mtab | grep sdc1
/dev/sdc1 /mnt/sdc1 vfat rw,relatime,uid=1001,gid=50,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
tc@box:~$
I don't have any ext* partitions in this machine to test the umount command with. I'll post as soon as I get a chance.
-
how is the difference between fstab and mtab created?
-
how is the difference between fstab and mtab created?
I have no idea. I did a quick test and found that I can't umount ext* partitions either.
This issue isn't a big deal for me since I only run TinyCore for a few hours at a time. With such a short uptime, I rarely need to actually umount partitions, and I can always just use sudo since I'm in a low danger environment.
Oh, yeesh. I just realized that there is a newer version of Core available (v4.7.4). I'll have to upgrade to that and report back.
Cheers,
lverns
-
Okay, I've bumped up to 4.7.4 and the issue still exists.
-
the ondemand script seems to unmount without sudo also as I just got this:
$ ondemand sshfs-fuse.tcz
umount: can't umount /mnt/test: Operation not permitted
-
I have the same problem with umount. I have found the cause of the issue: spurious group write permission on /etc/busybox.conf
~$ ls -l /etc/busybox.conf
-rw--w---- 1 root staff 140 Mar 4 2010 /etc/busybox.conf
~$ umount /mnt/sda3
umount: can't umount /mnt/sda3: Operation not permitted
~$ sudo chmod g-w /etc/busybox.conf
~$ ls -l /etc/busybox.conf
-rw------- 1 root staff 140 Mar 4 2010 /etc/busybox.conf
~$ umount /mnt/sda3
~$
I propose to correct this in next version
-
Wow, right. It works. But I'm still puzzled about what busybox is doing there with special config files about this when there is a perfectly standardized way to do it with options in fstab.
-
I have the same problem with umount. I have found the cause of the issue: spurious group write permission on /etc/busybox.conf
Good catch! 8)
-
Wow, right. It works. But I'm still puzzled about what busybox is doing there with special config files about this when there is a perfectly standardized way to do it with options in fstab.
fstab can only ever affect items included.
There are a lot of usage cases of mount where fstab would not get involved.
-
Then you would still be able to use something like mount -o users, no?
At least that's my interpretation after many years of mounting stuff.
-
Is your issue with the permissions of 'mount' or with the mechanism permissions of busybox applets are handled?
-
you're right tinypoodle, I mixed these two issues up.
-
I have the same problem with umount. I have found the cause of the issue: spurious group write permission on /etc/busybox.conf
~$ ls -l /etc/busybox.conf
-rw--w---- 1 root staff 140 Mar 4 2010 /etc/busybox.conf
~$ umount /mnt/sda3
umount: can't umount /mnt/sda3: Operation not permitted
~$ sudo chmod g-w /etc/busybox.conf
~$ ls -l /etc/busybox.conf
-rw------- 1 root staff 140 Mar 4 2010 /etc/busybox.conf
~$ umount /mnt/sda3
~$
I propose to correct this in next version
+1 on the Good Catch.
Applied to 4.7.5