WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: can't umount /mnt/sdb1: Operation not permitted  (Read 28595 times)

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
can't umount /mnt/sdb1: Operation not permitted
« 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

Pseudoman

  • Guest
Re: can't umount /mnt/sdb1: Operation not permitted
« Reply #1 on: January 27, 2013, 01:12:21 PM »
I noticed that too, so I started prefixing umount with sudo.

Offline beroje

  • Full Member
  • ***
  • Posts: 130
Re: can't umount /mnt/sdb1: Operation not permitted
« Reply #2 on: January 27, 2013, 01:19:38 PM »
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:~$

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: can't umount /mnt/sdb1: Operation not permitted
« Reply #3 on: January 27, 2013, 06:15:22 PM »
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"?

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: can't umount /mnt/sdb1: Operation not permitted
« Reply #4 on: January 27, 2013, 06:53:47 PM »
It would seem that busybox is ignoring its own configuration file, as in the past, it always worked.
sudo cat /etc/busybox.conf
10+ Years Contributing to Linux Open Source Projects.

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: can't umount /mnt/sdb1: Operation not permitted
« Reply #5 on: January 27, 2013, 07:50:46 PM »
oh, wow, yet an other place for this?
why isn't the users flag in fstab the only one to decide?

Offline lverns

  • Newbie
  • *
  • Posts: 29
Re: can't umount /mnt/sdb1: Operation not permitted
« Reply #6 on: February 02, 2013, 01:06:19 PM »
I'm also experiencing this same issue with Core 4.7.3
Code: [Select]
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.

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: can't umount /mnt/sdb1: Operation not permitted
« Reply #7 on: February 02, 2013, 03:29:33 PM »
how is the difference between fstab and mtab created?

Offline lverns

  • Newbie
  • *
  • Posts: 29
Re: can't umount /mnt/sdb1: Operation not permitted
« Reply #8 on: February 02, 2013, 04:07:51 PM »
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

Offline lverns

  • Newbie
  • *
  • Posts: 29
Re: can't umount /mnt/sdb1: Operation not permitted
« Reply #9 on: February 05, 2013, 04:56:14 PM »
Okay, I've bumped up to 4.7.4 and the issue still exists.

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: can't umount /mnt/sdb1: Operation not permitted
« Reply #10 on: February 14, 2013, 07:04:10 PM »
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

Offline u54749

  • Jr. Member
  • **
  • Posts: 70
Re: can't umount /mnt/sdb1: Operation not permitted
« Reply #11 on: February 15, 2013, 10:58:09 AM »
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

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: can't umount /mnt/sdb1: Operation not permitted
« Reply #12 on: February 15, 2013, 11:29:45 AM »
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.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: can't umount /mnt/sdb1: Operation not permitted
« Reply #13 on: February 15, 2013, 11:49:45 AM »
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)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: can't umount /mnt/sdb1: Operation not permitted
« Reply #14 on: February 15, 2013, 11:54:05 AM »
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.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)