fstab has "user" option, but still cann't be mounted by non-root user
Hello, below is one section of my fstab, I want my usb
harddisk(/dev/sdbx) can be mounted by the non-root,according the man
page of fstab,I set the "user" option,but still get error " mount:
only root can do that" when i try to mount it.
i tried the command: $mount /dev/sdb4 /media/usbdisk4_data and $mount
/dev/disk/by-uuid/e2f1534d-aecd-4f2a-a153-822ac4d73967
/media/usbdisk4_data, but both were failed.
$ls -l /bin/mount output: -rwsr-xr-x 1 root root 84944 8月 3 22:02
/bin/mount, there is suid bit.
I have googled the problem, it seems there are no other actions needed
to do, but why it still failed?
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAH3inR0QO_N=8pbhQ8dRzPs5J_wQCEE5LW+BEtXa+=z4qwu9j Q@mail.gmail.com">http://lists.debian.org/CAH3inR0QO_N=8pbhQ8dRzPs5J_wQCEE5LW+BEtXa+=z4qwu9j Q@mail.gmail.com
09-08-2011, 02:53 PM
Camaleón
fstab has "user" option, but still cann't be mounted by non-root user
On Thu, 08 Sep 2011 21:43:33 +0800, yuanwei xu wrote:
> Hello, below is one section of my fstab, I want my usb
> harddisk(/dev/sdbx) can be mounted by the non-root,according the man
> page of fstab,I set the "user" option,but still get error " mount: only
> root can do that" when i try to mount it.
>
>
> # /etc/fstab: static file system information.
> #
> # <file system> <mount point> <type> <options> <dump> <pass>
> # /dev/sdb4 none ext4 sw 0 0
> UUID=e2f1534d-aecd-4f2a-a153-822ac4d73967 /media/usbdisk4_data ext4 user,exec,dev,suid,rw,noauto 0 0
By using "noauto" the volume has to be manually mounted, is that right?
> i tried the command: $mount /dev/sdb4 /media/usbdisk4_data and $mount
> /dev/disk/by-uuid/e2f1534d-aecd-4f2a-a153-822ac4d73967
> /media/usbdisk4_data, but both were failed.
(...)
It should be just:
mount -U "e2f1534d-aecd-4f2a-a153-822ac4d73967"
What error are you getting?
Also, remember that the mount point should have the proper permissions:
ls -l /media
And now that I think, not sure if "/media" is a good place to put a
"statically" mounted volume, I would better create a dedicated mount
point outside that folder for such purpose.
Greetings,
--
Camaleón
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2011.09.08.14.53.53@gmail.com">http://lists.debian.org/pan.2011.09.08.14.53.53@gmail.com
09-08-2011, 03:12 PM
yuanwei xu
fstab has "user" option, but still cann't be mounted by non-root user
2011/9/8 Camaleón <noelamac@gmail.com>:
> On Thu, 08 Sep 2011 21:43:33 +0800, yuanwei xu wrote:
>
>> Hello, below is one section of my fstab, I want my usb
>> harddisk(/dev/sdbx) can be mounted by the non-root,according the man
>> page of fstab,I set the "user" option,but still get error " mount: only
>> root can do that" when i try to mount it.
>>
>>
>> # /etc/fstab: static file system information.
>> #
>> # <file system> <mount point> * <type> *<options> * * * <dump> *<pass>
>> # /dev/sdb4 * * * none * * * * * *ext4 * *sw * * * * * * *0 * * * 0
>> UUID=e2f1534d-aecd-4f2a-a153-822ac4d73967 * * /media/usbdisk4_data * *ext4 * *user,exec,dev,suid,rw,noauto * * * * * * *0 * * * 0
>
> By using "noauto" the volume has to be manually mounted, is that right?
>
>> i tried the command: $mount /dev/sdb4 /media/usbdisk4_data and $mount
>> /dev/disk/by-uuid/e2f1534d-aecd-4f2a-a153-822ac4d73967
>> /media/usbdisk4_data, but both were failed.
>
> (...)
>
> It should be just:
>
> mount -U "e2f1534d-aecd-4f2a-a153-822ac4d73967"
>
> What error are you getting?
Thanks, it is the right way, there is no error output. I have to admit
that I was not careful enough when reading the man page.
>
> Also, remember that the mount point should have the proper permissions:
>
> ls -l /media
>
> And now that I think, not sure if "/media" is a good place to put a
> "statically" mounted volume, I would better create a dedicated mount
> point outside that folder for such purpose.
Thanks for your advice.
>
> Greetings,
>
> --
> Camaleón
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: http://lists.debian.org/pan.2011.09.08.14.53.53@gmail.com
>
>
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAH3inR1K6STtoKdW3bEQS1M9wTrMEXMh_YtaMuRjqD=_Gvrpy Q@mail.gmail.com">http://lists.debian.org/CAH3inR1K6STtoKdW3bEQS1M9wTrMEXMh_YtaMuRjqD=_Gvrpy Q@mail.gmail.com
09-08-2011, 04:48 PM
Mark Grieveson
fstab has "user" option, but still cann't be mounted by non-root user
On Thu, 8 Sep 2011 14:48:08 +0000 (UTC)
debian-user-digest-request@lists.debian.org wrote:
> page of fstab,I set the "user" option,but still get error " mount:
> only root can do that" when i try to mount it.
>
>
> # /etc/fstab: static file system information.
> #
> # <file system> <mount point> <type> <options> <dump> <pass>
> # /dev/sdb4 none ext4 sw 0 0
> UUID=3De2f1534d-aecd-4f2a-a153-822ac4d73967 /media/usbdisk4_data
> ext4 user,exec,dev,suid,rw,noauto 0 0
I think you need to set up a mount point for your regular user, rather
than directly mounting the device in the /dev directory (. On my
machine, I have a two mount points for usb devices, since I have two
usb ports that I can use, and sometimes need to mount them
simultaneously. These are set up in the /media directory (/media/usb
and /media/usb2). My mount points are executable by all and can be
read by the user ("xr-x"):
My fstab looks like this:
/dev/sdc1 /media/usb vfat noauto,user
0 0 /dev/sdd1 /media/usb2 vfat
noauto,user 0 0
However, I'm not sure if this is correct, given that UUIDs with various
incomprehensible numbers/letters seem to be used now (my fstab also has
these). But, I can usually mount my usb sticks, so something is
working. Anyway, I feel that creating an actual mount point, rather
than listing "none", might help. Check the /media file to see if there
already is a mount point that you can use (IE, /media/usb). If so,
replace the "none" in your fstab with the mount point. If not, then
create a mount point, and subsequently add this to your fstab.
Mark
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110908124815.2eca01e9@torfree.net">http://lists.debian.org/20110908124815.2eca01e9@torfree.net
09-08-2011, 05:22 PM
Paul Johnson
fstab has "user" option, but still cann't be mounted by non-root user
You might try $ mount /media/usbdisk4_data and see if that works.
yuanwei xu <xuyuanwei@gmail.com> wrote:
>i tried the command: $mount /dev/sdb4 /media/usbdisk4_data and $mount
>/dev/disk/by-uuid/e2f1534d-aecd-4f2a-a153-822ac4d73967
>/media/usbdisk4_data, but both were failed.
>$ls -l /bin/mount output: -rwsr-xr-x 1 root root 84944 8月 3 22:02
>/bin/mount, there is suid bit.
>
>I have googled the problem, it seems there are no other actions needed
>to do, but why it still failed?
--
Paul Johnson
971-209-2327
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4e5c6b7c-efce-4ba1-8556-688609fe7386@email.android.com">http://lists.debian.org/4e5c6b7c-efce-4ba1-8556-688609fe7386@email.android.com
09-09-2011, 01:15 PM
yuanwei xu
fstab has "user" option, but still cann't be mounted by non-root user
2011/9/9 Paul Johnson <baloo@ursamundi.org>:
> You might try $ mount /media/usbdisk4_data and see if that works.
Yes, it works and it's really a smart way. With bash's auto
completion, it's perfect.
Thanks.
>
> yuanwei xu <xuyuanwei@gmail.com> wrote:
>
>
>>i tried the command: $mount /dev/sdb4 /media/usbdisk4_data and $mount
>>/dev/disk/by-uuid/e2f1534d-aecd-4f2a-a153-822ac4d73967
>>/media/usbdisk4_data, but both were failed.
>>$ls -l /bin/mount output: -rwsr-xr-x 1 root root 84944 8月 3 22:02
>>/bin/mount, there is suid bit.
>>
>>I have googled the problem, it seems there are no other actions needed
>>to do, but why it still failed?
>
> --
> Paul Johnson
> 971-209-2327
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: http://lists.debian.org/4e5c6b7c-efce-4ba1-8556-688609fe7386@email.android.com
>
>
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/CAH3inR122YWpbqdpqK-BjoAGmTmwTeBwxDCWLQx9?-QjeQw@mail.gmail.com