From owner-freebsd-current@freebsd.org Sun Jan 14 05:50:58 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5BF7E7CF01 for ; Sun, 14 Jan 2018 05:50:58 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: from mail-it0-x236.google.com (mail-it0-x236.google.com [IPv6:2607:f8b0:4001:c0b::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 934A26D003 for ; Sun, 14 Jan 2018 05:50:58 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: by mail-it0-x236.google.com with SMTP id f143so13675745itb.0 for ; Sat, 13 Jan 2018 21:50:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=eELoivh9nvjM84b//b3c2dCGJ25Cb8TixSctkirDhOU=; b=qpZiZOumyK+2nWOj5Z3IUUODt8QZES0KQzD4zYgPatkSVTttGcfHHxyEI05BhPMWZY iD4fN6ohQjMHxMxghGVG2zsefQFZpm6fSoozqLIqBXWA4h5GjOaF2ukIGVj5pPYLiMmS AtzhhZdUjrXvBtgmyaK9u4ZvvZZmppB6QSGl6zw1hHWbn2egv/9MvLcBRDmEeln3wYh/ tecq+A2k1bTB9l3NySKscRtVW1eRz3dRbV8s0+rqc9oOX5k0YNBlL0+P7x4HHIrv3VtR sIVNYsamaMlkGpf7QGAyc9TYrVCFZSeDIwkHRdtwVfaORcrA0e0lGXRnOeQYdlmghr/L BaZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=eELoivh9nvjM84b//b3c2dCGJ25Cb8TixSctkirDhOU=; b=lfWgBC7BrZsJ/FJSKuy5icunMPQ/uDwwP/klvbEC2QqxW7Zb1bWfndFYIXSVsUQjZ4 cLLuuhyRkds+P4ZL5XAv4x5W4pIZlJ7Zwfj5DYqpph53vHivsXY2zwnnC/o5W0SgPE5F 32TnusUgXS68ABvrD+dryRtPnnJOlkYnzRzUbBRIOtyqt9a1kVtw8uh7YHCdWFL1EsuP KPnShpdc+LEUbUOP7zRU3Yk8tY2c8c6wnXfxtUEVQESF5qVC3wuWZWimc6Vj7tk0riIM rGNU1D3jo1joozPandPJf1MxlhKw/bZNZa1EiNL84IU9IXeBuexOfN1jU9gNv6jIVH0t UHCQ== X-Gm-Message-State: AKwxytcPQWiQiGYxocHm5O/XNTzuRTGb3ivGI7d4FZ6kh2pNPbghKCps x3XsVbSf5wweZuOzlkmXEg8CdcqiZL39/be/PBE= X-Google-Smtp-Source: ACJfBotqUVx0OYs1cRIs5lj7djmAVTXr1x6acfV0JZy+D7SSScDVXVifS0optRHNPLfG0f7lRT6N7kRIJuKIH0k0Fa8= X-Received: by 10.36.110.71 with SMTP id w68mr9445802itc.119.1515909057934; Sat, 13 Jan 2018 21:50:57 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.164.193 with HTTP; Sat, 13 Jan 2018 21:50:57 -0800 (PST) In-Reply-To: References: From: blubee blubeeme Date: Sun, 14 Jan 2018 13:50:57 +0800 Message-ID: Subject: Re: msdosfs_iconv To: Henry Hu Cc: FreeBSD current Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jan 2018 05:50:58 -0000 On Sun, Jan 14, 2018 at 1:39 PM, Henry Hu wrote: > > > On Sun, Jan 14, 2018 at 12:20 AM, blubee blubeeme > wrote: > >> >> >> On Sun, Jan 14, 2018 at 12:16 PM, Henry Hu wrote: >> >>> >>> >>> On Sat, Jan 13, 2018 at 10:56 PM, blubee blubeeme >>> wrote: >>> >>>> >>>> >>>> On Sun, Jan 14, 2018 at 11:53 AM, Henry Hu >>>> wrote: >>>> >>>>> >>>>> >>>>> On Sat, Jan 13, 2018 at 9:10 PM, blubee blubeeme >>>>> wrote: >>>>> >>>>>> This is a repost from freebsd-question; Hoping to get more exposure >>>>>> and >>>>>> help here. >>>>>> >>>>>> I am trying to run mount_msdosfs with the option to set locale like >>>>>> this: >>>>>> mount_msdosfs -L en_US.UTF-8 /dev/da0s1 $HOME/usb >>>>>> >>>>>> This returns operation not permitted. >>>>>> >>>>>> usrmount is set to 1 and everything mounts as expected w/o root if I >>>>>> remove >>>>>> the locale option. The problem here is that my document filenames are >>>>>> garbled and I can't actually open the files. >>>>>> >>>>>> kiconvtool: https://wiki.freebsd.org/DmitryMarakasov/kiconvtool >>>>>> is said to work but it does not, after installing it I still get the >>>>>> exact >>>>>> same error. >>>>>> >>>>>> Have you tried to kldload msdosfs_iconv first? >>>>> >>>>> Is there a way to set locale when using mount_msdosfs without sudo? >>>>>> _______________________________________________ >>>>>> freebsd-current@freebsd.org mailing list >>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-current >>>>>> To unsubscribe, send any mail to "freebsd-current-unsubscribe@f >>>>>> reebsd.org" >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Cheers, >>>>> Henry >>>>> >>>> Yes, /etc/rc.conf has this line: >>>> kld_list="nvidia-modeset msdosfs_iconv" >>>> >>>> >>> I just tried that and it works. I can create filenames in Chinese on the >>> mounted drive. >>> The command I used: >>> >>> > mount_msdosfs -L zh_CN.UTF-8 /dev/da1p1 /tmp/y >>> >>> kernel modules: >>> >>> > kldstat | grep iconv >>> 30 3 0xffffffff8506e000 458f libiconv.ko >>> 33 1 0xffffffff8507a000 801 msdosfs_iconv.ko >>> >>> But I'm using 11.1-STABLE. Maybe something changed? >>> >>> -- >>> Cheers, >>> Henry >>> >> I am running: >> FreeBSD blubee 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r326056: Tue Nov 21 >> 14:54:55 UTC 2017 root@releng3.nyi.freebsd.org: >> /usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 >> >> kldstats >> 10 1 0xffffffff85e89000 806 msdosfs_iconv.ko >> 11 1 0xffffffff85e8a000 4633 libiconv.ko >> >> Can you list out the steps that you followed? >> >> I know that if I first run the mount command as root; I can then mount >> and unmount as regular user. >> >> If I try to mount with that -L flag >> msdosfs_iconv complains at me. >> > > I just inserted a USB drive, and created /tmp/y for testing, which is > owned by my user. I can access /dev/da1p1 as my user. > > Do you mean that if you have mounted & unmounted as root once, you can > mount as regular user? > Maybe that changes something, like loaded a kernel module? Maybe you can > compare kldstat output? > > -- > Cheers, > Henry > if you first run the mount_msdosfs command as root, it'll load the locale settings just fine. If you logout or reboot and try to call mount_msdosfs -L [locale] as a regular user; The command will fail.