mount_msdosfs: msdosfs_iconv: Operation not permitted

aeuii at posteo.de aeuii at posteo.de
Wed Jul 29 19:33:23 UTC 2015


Hello,

it looks like an old issue [1,2,3], but it's bugging me.

Generally, I'm not able to mount msdos file system as a regular user
with extra charset options (-L) before the superuser.  After the
superuser mounts (and unmounts) the file system, regular users can do it
to.  Below is more info about my system and the detailed steps to
reproduce the issue.

Thanks for suggestions.
Stefan


[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=109024
[2] https://forums.freebsd.org/threads/mount_msdosfs-msdosfs_iconv-operation-not-permitted.36897/
[3] https://forums.freebsd.org/threads/mount_msdosfs-bug.2668/



** my system

% uname -a
FreeBSD silver.local 10.1-RELEASE-p10 FreeBSD 10.1-RELEASE-p10 #0: Wed May 13 06:54:13 UTC 2015     root at amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64


% locale
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_ALL=


% cat /etc/fstab
/dev/da1        /home/user/mnt/u0      msdosfs rw,noauto,noexec,-L=en_GB.UTF-8,-m=600,-M=700   0       0
/dev/da1s1      /home/user/mnt/u1      msdosfs rw,noauto,noexec,-L=en_GB.UTF-8,-m=600,-M=700   0       0


% sysctl vfs.usermount
vfs.usermount: 1



% cat /etc/rc.conf | grep kiconv
kiconv_preload="YES"
kiconv_local_charset="UTF-8"
kiconv_foreign_charset="UTF-16BE UTF-8"
kiconv_fstypes="msdosfs"


% pkg info|grep kiconv
kiconvtool-0.97                Tool to preload kernel iconv charset tables




** initially loaded tables

% kiconvtool -d
UTF-8 -> UTF-16BE
UTF-16BE -> UTF-8


** try to mount as a regular user

% mount /home/user/mnt/u1
mount_msdosfs: msdosfs_iconv: Operation not permitted



** mount fs as root

# mount /home/user/mnt/u1
# umount /home/user/mnt/u1


** tables after root mounted the fs

% kiconvtool -d
UTF-8 -> UTF-16BE
UTF-16BE -> UTF-8
UTF-8 -> _wctype


** now a regular user can mount too

% mount /home/user/mnt/u1


More information about the freebsd-stable mailing list