[Discuss] Mounting USB drives
Cy Schubert
Cy.Schubert at komquats.com
Tue Aug 15 19:33:29 PDT 2017
In message <32e8c36b-bd89-0136-ab52-623d6fba98af at shaw.ca>, John Blomfield
write
s:
> Hmm! putting
> UUID=07087C1B775D68E6 /mnt/weekly-bkup ntfs-3g
> uid=john,gid=john,user,umask=000,utf8,noauto 0 0
>
> in the fstab file causes KDE to mount it when I click it's popup "open
> in File Manager". However if I try to do the same thing in my program or
> in a terminal I get:
>
> [john at ban ~]$ mount /mnt/weekly-bkup
> Error opening '/dev/sdc1': Permission denied
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KDE is probably using polkit to do its dirty work. You can overcome this by
running mount through sudo or set the vfs.uermount sysctl to 1 in
sysctl.conf (and run the command by hand to avoid a reboot).
> Failed to mount '/dev/sdc1': Permission denied
> Please check '/dev/sdc1' and the ntfs-3g binary permissions,
^^^^^^^^^^^^^^^^^^^^^^^^^^^
> and the mounting user ID. More explanation is provided at
> http://tuxera.com/community/ntfs-3g-faq/#unprivileged
Making ntfs-3g setuid root is a really bad idea.
>
> I don't understand the explanation given in tuxera, sounds like a ntfs
> problem.
No. Your account doesn't have permission.
>
> However, clicking the KDE popup gives me what I want now, which is to
> mount the USB drive on /mnt/weekly-bkup! And I don't need to run mount
> in my program.
KDE is probably using polkit (policy kit). Most modern GUIs do.
>
> John
>
>
> On 2017-08-15 12:25 PM, John Blomfield wrote:
> > Thanks brendan, I will try that.
> >
> > On 2017-08-15 11:49 AM, brendan wrote:
> >> you can specify in fstab that a non-root user is able to mount/unmount a
> >> device. see the "non-superuser mounts" section in the mount manpage:
> >> http://man7.org/linux/man-pages/man8/mount.8.html
> >>
> >> additionally, the "noauto" option will stop it from trying to mount the
> >> usb drive at boot.
> >>
> >>
> >> On 2017-08-15 10:14 AM, John Blomfield wrote:
> >>> Hi Ron,
> >>> Yes, and this would mount the USB drive at boot time if it's plugged
> >>> in but if it's not plugged in boot tends to hang.
> >>> I want to plug in the USB drive after boot is complete and mounting
> >>> requires root.
> >>>
> >>> John
> >>>
> >>> On 2017-08-15 09:53 AM, Ron De Beck wrote:
> >>>> Hi John,
> >>>> Probably a dumb question.
> >>>> Is there a setting that can be
> >>>> added to fstab line for the device
> >>>> using a specific UUID?
> >>>>
> >>
> >> _______________________________________________
> >> Discuss mailing list
> >> Discuss at vlug.org
> >> http://vlug.org/mailman/listinfo/discuss_vlug.org
> >>
> >
>
> --
> John Blomfield
> Delivered by Thunderbird Email on Linux OpenSuse-KDE4
>
>
>
>
> _______________________________________________
> Discuss mailing list
> Discuss at vlug.org
> http://vlug.org/mailman/listinfo/discuss_vlug.org
>
--
Cheers,
Cy Schubert <Cy.Schubert at cschubert.com>
FreeBSD UNIX: <cy at FreeBSD.org> Web: http://www.FreeBSD.org
The need of the many outweighs the greed of the few.
More information about the Discuss
mailing list