mount_msdosfs: msdosfs_iconv: Operation not permitted

I am trying to mount a FAT32 drive with Russian file names:

Code:
mount_msdosfs -L en_US.UTF-8 -D UTF-8 -o large /dev/da0s1 ~/mnt/usb
mount_msdosfs: msdosfs_iconv: Operation not permitted

But I already have msdosfs_iconv.ko loaded:

Code:
kldstat|grep msdos
12    1 0xffffffff815b7000 11e0     msdosfs_iconv.ko

and regular user can mount:

Code:
sysctl vfs.usermount
vfs.usermount: 1


What's interesting if I mount/umount once as root:

Code:
sudo mount_msdosfs -L en_US.UTF-8 -D UTF-8 -o large /dev/da0s1 ~/mnt/usb
sudo umount ~/mnt/usb

then I can successfully mount/umount as a regular user without getting the error in the title.

My system:

Code:
uname -a
FreeBSD obama-fbsd 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

What am I missing in my configuration?
 
The msdosfs_iconv module is loaded during boot:

Code:
grep msdosfs_iconv /boot/loader.conf
msdosfs_iconv_load="YES"

Just to be sure I ran kldstat before and after 'sudo mount...' - no differences.
 
I'm reviving this old thread because I have the same problem. In my case it started with a directory with non-foreign "invalid characters". The directory is displayed normally on Windows but is not even visible on FreeBSD. Only ls() sees it but throws errors.

I've tried every solution I've found on the Internet to no avail, including using misc/mc, converters/convmv, sysutils/rename, etc. But this is another topic.

Finally I was able to make iconv work, but in a weird way.

First you have to mount as root: mount_msdosfs -L en_US.UTF-8 -D UTF-8 /dev/<device> /mountpoint

You can unmount the device now: umount /mountpoint

Then you run the first command again but as a normal user and it works fine this time: mount_msdosfs -L en_US.UTF-8 -D UTF-8 /dev/<device> /mountpoint

What's even weirder is that at any time, if you unload msdosfs_iconv.ko and load it again, nothing works anymore. Only running the mount_msdosfs command as root first makes it work properly.
 
The error message is... funny. It's not directly about the kld, but instead something went wrong when mount_msdosfs tried to configure the charset translations. Maybe some language-file in the depths of /usr/share has root-only permissions.

Juha

who would gladly give up å, ä and ö.
 
Back
Top