Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Feb 2007 16:18:45 GMT
From:      Rechistov Grigory<ggg_mail@inbox.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/109024: mount_msdosfs: msdosfs_iconv: Operation not permitted
Message-ID:  <200702101618.l1AGIjGO006944@www.freebsd.org>
Resent-Message-ID: <200702101620.l1AGKGnj005027@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         109024
>Category:       kern
>Synopsis:       mount_msdosfs: msdosfs_iconv: Operation not permitted
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 10 16:20:15 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Rechistov Grigory
>Release:        6.2-STABLE
>Organization:
>Environment:
FreeBSD ipv82-180.rt.private.mipt.ru 6.2-STABLE FreeBSD 6.2-STABLE #3: Thu Jan 25 15:50:36 MSK 2007     GGG@ipv82-180.rt.private.mipt.ru:/usr/obj/usr/src/sys/DELL_v4  i386

>Description:
I want to use automounter application thunar-volman (Xfce desktop) powered by HAL. I hav e a line in my /etc/fstab, which corresponds to my flash drive: 
/dev/da0s1              /mnt/FLASH0     msdosfs rw,noauto,-u=GGG,-L=ru_RU.KOI8-R,-D=CP866       0       0

but when I plug it in an error appears: mount_msdosfs: msdosfs_iconv: Operation not permitted. I have sysctl vfs.usermount set to 1, kernel modules msdosfs.ko and msdosfs_iconv.ko loaded. So I try to mount the device by hand as an ordinary user: $ mount -t msdosfs -o-L=ru_RU.KOI8-R,-D=CP866 /dev/da0s1 /mnt/FLASH0; all rights on folder are set correctly so I should be able to perform the operation. But the same error raises. When I try to mount cd9660 and ntfs volumes with "-C koi8-r" option everything is just fine (though they perform  different conversion from unicode). When I try to mount the same msdosfs disk without any locale options - it works. When mount_msdosfs is run from root user - no errors. So the problem is somewhere in kernel iconv mechanism.
>How-To-Repeat:
[check that sysctl vfs.usermount is set to 1, and mountpoint is owned by user]
$ mount -t msdosfs -o-L=ru_RU.KOI8-R,-D=CP866 /dev/da0s1 /mnt/FLASH0
mount_msdosfs: msdosfs_iconv: Operation not permitted
$ mount -t msdosfs /dev/da0s1 /mnt/FLASH0
This works fine.
>Fix:
The only way to continue use the automounter in this case is to set suid bit to mount_msdosfs. This is not the very best solution obviously. In my case there is also a bug in exo-mount (program which actually calls mount program - it handles HAL specification in incomplete way, elsewhere there would have been a elegant and robust workaround, I've also sent a PR to developers)
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702101618.l1AGIjGO006944>