public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] USB permission/owner - change not allowed as root
@ 2013-12-30  2:42 Joseph
  2013-12-30  3:41 ` Dale
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Joseph @ 2013-12-30  2:42 UTC (permalink / raw
  To: gentoo-user

After recent upgrade when I mount my USB and try as root:

chown joseph:users /media/stick/Ancient-Electricity_new.ppt 
chown: changing ownership of ‘/media/stick/Ancient-Electricity_new.ppt’: Operation not permitted

file ownership is:
-rwxr-xr-x 1 root root 5796864 Mar  6  2013 Ancient-Electricity_new.ppt

-- 
Joseph


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-30  2:42 [gentoo-user] USB permission/owner - change not allowed as root Joseph
@ 2013-12-30  3:41 ` Dale
  2013-12-30  3:56   ` Joseph
  2013-12-30  4:12   ` Joseph
  2013-12-30  7:51 ` Edward M
  2013-12-30 18:06 ` Bruce Hill
  2 siblings, 2 replies; 26+ messages in thread
From: Dale @ 2013-12-30  3:41 UTC (permalink / raw
  To: gentoo-user

Joseph wrote:
> After recent upgrade when I mount my USB and try as root:
>
> chown joseph:users /media/stick/Ancient-Electricity_new.ppt chown:
> changing ownership of ‘/media/stick/Ancient-Electricity_new.ppt’:
> Operation not permitted
>
> file ownership is:
> -rwxr-xr-x 1 root root 5796864 Mar  6  2013 Ancient-Electricity_new.ppt
>

Is it mounted Read Only?  It's the only thing I can think of.  I'm not
sure if that would keep it from changing it if it is either. 

Dale

:-)  :-) 

-- 
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-30  3:41 ` Dale
@ 2013-12-30  3:56   ` Joseph
  2013-12-30  4:05     ` covici
  2013-12-30  4:12   ` Joseph
  1 sibling, 1 reply; 26+ messages in thread
From: Joseph @ 2013-12-30  3:56 UTC (permalink / raw
  To: gentoo-user

On 12/29/13 21:41, Dale wrote:
>Joseph wrote:
>> After recent upgrade when I mount my USB and try as root:
>>
>> chown joseph:users /media/stick/Ancient-Electricity_new.ppt chown:
>> changing ownership of ‘/media/stick/Ancient-Electricity_new.ppt’:
>> Operation not permitted
>>
>> file ownership is:
>> -rwxr-xr-x 1 root root 5796864 Mar  6  2013 Ancient-Electricity_new.ppt
>>
>
>Is it mounted Read Only?  It's the only thing I can think of.  I'm not
>sure if that would keep it from changing it if it is either.
>
>Dale
>
>:-)  :-)
>
>-- 
>I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
>

When I open the USB stick, it doesn't say anything (on the top) "read only mode".

-- 
Joseph


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-30  3:56   ` Joseph
@ 2013-12-30  4:05     ` covici
  2013-12-30  4:14       ` Joseph
  0 siblings, 1 reply; 26+ messages in thread
From: covici @ 2013-12-30  4:05 UTC (permalink / raw
  To: gentoo-user


Joseph <syscon780@gmail.com> wrote:

> On 12/29/13 21:41, Dale wrote:
> >Joseph wrote:
> >> After recent upgrade when I mount my USB and try as root:
> >>
> >> chown joseph:users /media/stick/Ancient-Electricity_new.ppt chown:
> >> changing ownership of ‘/media/stick/Ancient-Electricity_new.ppt’:
> >> Operation not permitted
> >>
> >> file ownership is:
> >> -rwxr-xr-x 1 root root 5796864 Mar  6  2013 Ancient-Electricity_new.ppt
> >>
> >
> >Is it mounted Read Only?  It's the only thing I can think of.  I'm not
> >sure if that would keep it from changing it if it is either.
> >
> >Dale
> >
> >:-)  :-)
> >
> > -- 
> >I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
> >
> 
> When I open the USB stick, it doesn't say anything (on the top) "read only mode".

What file system on the stick? If it is FAT there is no such thing as ownership.
-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici
         covici@ccs.covici.com


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-30  3:41 ` Dale
  2013-12-30  3:56   ` Joseph
@ 2013-12-30  4:12   ` Joseph
  2013-12-30 16:52     ` wabenbau
  1 sibling, 1 reply; 26+ messages in thread
From: Joseph @ 2013-12-30  4:12 UTC (permalink / raw
  To: gentoo-user

On 12/29/13 21:41, Dale wrote:
>Joseph wrote:
>> After recent upgrade when I mount my USB and try as root:
>>
>> chown joseph:users /media/stick/Ancient-Electricity_new.ppt chown:
>> changing ownership of ‘/media/stick/Ancient-Electricity_new.ppt’:
>> Operation not permitted
>>
>> file ownership is:
>> -rwxr-xr-x 1 root root 5796864 Mar  6  2013 Ancient-Electricity_new.ppt
>>
>
>Is it mounted Read Only?  It's the only thing I can think of.  I'm not
>sure if that would keep it from changing it if it is either.

For some reason or another the system doesn't like my fstab entry:
/dev/sdb1		/media/stick	auto    	noauto,rw,users  0  0

I like consistent volume naming so I have the above entry in my fstab
When I remove this like it mounts read/write with correct permissions/ownership; why?

-- 
Joseph


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-30  4:05     ` covici
@ 2013-12-30  4:14       ` Joseph
  0 siblings, 0 replies; 26+ messages in thread
From: Joseph @ 2013-12-30  4:14 UTC (permalink / raw
  To: gentoo-user

On 12/29/13 23:05, covici@ccs.covici.com wrote:
[snip]
>> >> file ownership is:
>> >> -rwxr-xr-x 1 root root 5796864 Mar  6  2013 Ancient-Electricity_new.ppt
>> >>
>> >
>> >Is it mounted Read Only?  It's the only thing I can think of.  I'm not
>> >sure if that would keep it from changing it if it is either.
>> >
>> >Dale
>> >
>> >:-)  :-)
>> >
>> > --
>> >I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
>> >
>>
>> When I open the USB stick, it doesn't say anything (on the top) "read only mode".
>
>What file system on the stick? If it is FAT there is no such thing as ownership.

Regardless of the file type, if the system present it as owner/user "root"
-rwxr-xr-x 1 root root 5796864 Mar  6  2013 Ancient-Electricity_new.ppt

I should be able to change the permission when I login as root, but I can not; that is what puzzling me.

-- 
Joseph


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-30  2:42 [gentoo-user] USB permission/owner - change not allowed as root Joseph
  2013-12-30  3:41 ` Dale
@ 2013-12-30  7:51 ` Edward M
  2013-12-30  8:38   ` Alan McKinnon
  2013-12-30 18:06 ` Bruce Hill
  2 siblings, 1 reply; 26+ messages in thread
From: Edward M @ 2013-12-30  7:51 UTC (permalink / raw
  To: gentoo-user

On Sun, 29 Dec 2013 19:42:33 -0700
Joseph <syscon780@gmail.com> wrote:

> After recent upgrade when I mount my USB and try as root:
> 
> chown joseph:users /media/stick/Ancient-Electricity_new.ppt 
> chown: changing ownership of
> ‘/media/stick/Ancient-Electricity_new.ppt’: Operation not permitted
> 
> file ownership is:
> -rwxr-xr-x 1 root root 5796864 Mar  6  2013
> Ancient-Electricity_new.ppt
> 


I too ran the chown command on my USB flash and got the same
response as you did:

        localhost001 media # chown cru:users flash-drive1/
          chown: changing ownership of ‘flash-drive1/’: Operation not
    permitted

          drwxr-xr-x 7 root root 16384 Dec 31  1969 flash-drive1  

  Don't know what to tell you. interesting....my says Dec 31 1969. 


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-30  7:51 ` Edward M
@ 2013-12-30  8:38   ` Alan McKinnon
  2013-12-30  9:41     ` Edward M
  2013-12-30 16:32     ` Joseph
  0 siblings, 2 replies; 26+ messages in thread
From: Alan McKinnon @ 2013-12-30  8:38 UTC (permalink / raw
  To: gentoo-user

On 30/12/2013 09:51, Edward M wrote:
> On Sun, 29 Dec 2013 19:42:33 -0700
> Joseph <syscon780@gmail.com> wrote:
> 
>> After recent upgrade when I mount my USB and try as root:
>>
>> chown joseph:users /media/stick/Ancient-Electricity_new.ppt 
>> chown: changing ownership of
>> ‘/media/stick/Ancient-Electricity_new.ppt’: Operation not permitted
>>
>> file ownership is:
>> -rwxr-xr-x 1 root root 5796864 Mar  6  2013
>> Ancient-Electricity_new.ppt
>>
> 
> 
> I too ran the chown command on my USB flash and got the same
> response as you did:
> 
>         localhost001 media # chown cru:users flash-drive1/
>           chown: changing ownership of ‘flash-drive1/’: Operation not
>     permitted
> 
>           drwxr-xr-x 7 root root 16384 Dec 31  1969 flash-drive1  
> 
>   Don't know what to tell you. interesting....my says Dec 31 1969. 



Read the man page for mount, section vfat.


You can't change the owner as FAT doesn't have a concept of owner, so
it's simulated at mount time. You can't change it at runtime.

To change it you have to umount the device and remount it using the
appropriate option, all in the man page


-- 
Alan McKinnon
alan.mckinnon@gmail.com



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-30  8:38   ` Alan McKinnon
@ 2013-12-30  9:41     ` Edward M
  2013-12-30 16:32     ` Joseph
  1 sibling, 0 replies; 26+ messages in thread
From: Edward M @ 2013-12-30  9:41 UTC (permalink / raw
  To: gentoo-user

On Mon, 30 Dec 2013 10:38:03 +0200
Alan McKinnon <alan.mckinnon@gmail.com> wrote:

> On 30/12/2013 09:51, Edward M wrote:
> > On Sun, 29 Dec 2013 19:42:33 -0700
> > Joseph <syscon780@gmail.com> wrote:
> > 
> >> After recent upgrade when I mount my USB and try as root:
> >>
> >> chown joseph:users /media/stick/Ancient-Electricity_new.ppt 
> >> chown: changing ownership of
> >> ‘/media/stick/Ancient-Electricity_new.ppt’: Operation not permitted
> >>
> >> file ownership is:
> >> -rwxr-xr-x 1 root root 5796864 Mar  6  2013
> >> Ancient-Electricity_new.ppt
> >>
> > 
> > 
> > I too ran the chown command on my USB flash and got the same
> > response as you did:
> > 
> >         localhost001 media # chown cru:users flash-drive1/
> >           chown: changing ownership of ‘flash-drive1/’: Operation
> > not permitted
> > 
> >           drwxr-xr-x 7 root root 16384 Dec 31  1969 flash-drive1  
> > 
> >   Don't know what to tell you. interesting....my says Dec 31 1969. 
> 
> 
> 
> Read the man page for mount, section vfat.
> 
> 
> You can't change the owner as FAT doesn't have a concept of owner, so
> it's simulated at mount time. You can't change it at runtime.
> 
> To change it you have to umount the device and remount it using the
> appropriate option, all in the man page
> 
> 

      Thank you for the explanation. I appreciate it a lot. I will
      read the man page for mount and experiment a little. 


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-30  8:38   ` Alan McKinnon
  2013-12-30  9:41     ` Edward M
@ 2013-12-30 16:32     ` Joseph
  2013-12-30 16:36       ` Randolph Maaßen
  1 sibling, 1 reply; 26+ messages in thread
From: Joseph @ 2013-12-30 16:32 UTC (permalink / raw
  To: gentoo-user

On 12/30/13 10:38, Alan McKinnon wrote:

[snip]
>> I too ran the chown command on my USB flash and got the same
>> response as you did:
>>
>>         localhost001 media # chown cru:users flash-drive1/
>>           chown: changing ownership of ‘flash-drive1/’: Operation not
>>     permitted
>>
>>           drwxr-xr-x 7 root root 16384 Dec 31  1969 flash-drive1
>>
>>   Don't know what to tell you. interesting....my says Dec 31 1969.
>
>
>
>Read the man page for mount, section vfat.
>
>
>You can't change the owner as FAT doesn't have a concept of owner, so
>it's simulated at mount time. You can't change it at runtime.
>
>To change it you have to umount the device and remount it using the
>appropriate option, all in the man page

I don't think it has anything to do with FAT.
Everything was working just find on my system before upgrade.

With the line in fstab:
/dev/sdb1		/media/stick	auto    	noauto,rw,users        0  0

Some USB stick are mounted as root:root and I can not change that even as root.
When I remove this like from fstab.
The USB stick are mounting correctly as joseph:users owner except they have different mounting location which I don't like.

-- 
Joseph


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-30 16:32     ` Joseph
@ 2013-12-30 16:36       ` Randolph Maaßen
  2013-12-30 17:22         ` Joseph
  0 siblings, 1 reply; 26+ messages in thread
From: Randolph Maaßen @ 2013-12-30 16:36 UTC (permalink / raw
  To: gentoo-user

2013/12/30 Joseph <syscon780@gmail.com>:
> On 12/30/13 10:38, Alan McKinnon wrote:
>
> [snip]
>
>>> I too ran the chown command on my USB flash and got the same
>>> response as you did:
>>>
>>>         localhost001 media # chown cru:users flash-drive1/
>>>           chown: changing ownership of ‘flash-drive1/’: Operation not
>>>     permitted
>>>
>>>           drwxr-xr-x 7 root root 16384 Dec 31  1969 flash-drive1
>>>
>>>   Don't know what to tell you. interesting....my says Dec 31 1969.
>>
>>
>>
>>
>> Read the man page for mount, section vfat.
>>
>>
>> You can't change the owner as FAT doesn't have a concept of owner, so
>> it's simulated at mount time. You can't change it at runtime.
>>
>> To change it you have to umount the device and remount it using the
>> appropriate option, all in the man page
>
>
> I don't think it has anything to do with FAT.
> Everything was working just find on my system before upgrade.
>
> With the line in fstab:
>
> /dev/sdb1               /media/stick    auto            noauto,rw,users
> 0  0
>
> Some USB stick are mounted as root:root and I can not change that even as
> root.
> When I remove this like from fstab.
> The USB stick are mounting correctly as joseph:users owner except they have
> different mounting location which I don't like.
>
> --
> Joseph
>

You can specify the user/group that mounts a device with some mount
options. I think they are uid=<username>/gid=<groupname> but I'm not
sure and unfortunatly not on my Linux box at the moment.

-- 
Mit freundlichen Grüßen / Best regards

Randolph Maaßen


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-30  4:12   ` Joseph
@ 2013-12-30 16:52     ` wabenbau
  2013-12-31  1:38       ` Neil Bothwick
  0 siblings, 1 reply; 26+ messages in thread
From: wabenbau @ 2013-12-30 16:52 UTC (permalink / raw
  To: gentoo-user

Am Sonntag, 29.12.2013 um 21:12
schrieb Joseph <syscon780@gmail.com>:

> For some reason or another the system doesn't like my fstab entry:
> /dev/sdb1		/media/stick	auto
> noauto,rw,users  0  0

AFAIK the option to permit user mount is "user" and not "users". Could
this cause the problem?


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-30 16:36       ` Randolph Maaßen
@ 2013-12-30 17:22         ` Joseph
  2013-12-31  8:49           ` Alan McKinnon
  0 siblings, 1 reply; 26+ messages in thread
From: Joseph @ 2013-12-30 17:22 UTC (permalink / raw
  To: gentoo-user

On 12/30/13 17:36, Randolph Maaßen wrote:
[snip]
>>
>> With the line in fstab:
>>
>> /dev/sdb1               /media/stick    auto            noauto,rw,users
>> 0  0
>>
>> Some USB stick are mounted as root:root and I can not change that even as
>> root.
>> When I remove this like from fstab.
>> The USB stick are mounting correctly as joseph:users owner except they have
>> different mounting location which I don't like.
>>
>> --
>> Joseph
>>
>
>You can specify the user/group that mounts a device with some mount
>options. I think they are uid=<username>/gid=<groupname> but I'm not
>sure and unfortunatly not on my Linux box at the moment.

I've tried in fstab:
/dev/sdb1               /media/stick    auto            noauto,uid=1000,gid=100,umask=077        0  0

but I'm getting an error:
Error mounting system-managed device /dev/sdb1: Command-line `mount "/media/stick"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad 
superblock on /dev/sdb1,

What am I missing?

-- 
Joseph


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-30  2:42 [gentoo-user] USB permission/owner - change not allowed as root Joseph
  2013-12-30  3:41 ` Dale
  2013-12-30  7:51 ` Edward M
@ 2013-12-30 18:06 ` Bruce Hill
  2 siblings, 0 replies; 26+ messages in thread
From: Bruce Hill @ 2013-12-30 18:06 UTC (permalink / raw
  To: gentoo-user

On Sun, Dec 29, 2013 at 07:42:33PM -0700, Joseph wrote:
> After recent upgrade when I mount my USB and try as root:
> 
> chown joseph:users /media/stick/Ancient-Electricity_new.ppt 
> chown: changing ownership of ‘/media/stick/Ancient-Electricity_new.ppt’: Operation not permitted
> 
> file ownership is:
> -rwxr-xr-x 1 root root 5796864 Mar  6  2013 Ancient-Electricity_new.ppt

The thread kinda zig-zagged off on me, so hope you don't mind a post here.

Perhaps this guide would be as nice a read for you as it was for me. It brings
back memories as I started using Linux in June, 2003, just before he wrote it:

http://www.linuxquestions.org/linux/answers/Security/Quick_and_Dirty_Guide_to_Linux_File_Permissions

Second, please issue "blkid" and give the line for this USB device.

Cheers,
Bruce
-- 
List replies preferred.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

Don't top-post: http://en.wikipedia.org/wiki/Top_post#Top-posting


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-30 16:52     ` wabenbau
@ 2013-12-31  1:38       ` Neil Bothwick
  2013-12-31  2:30         ` wabenbau
  0 siblings, 1 reply; 26+ messages in thread
From: Neil Bothwick @ 2013-12-31  1:38 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 472 bytes --]

On Mon, 30 Dec 2013 17:52:56 +0100, wabenbau@gmail.com wrote:

> > For some reason or another the system doesn't like my fstab entry:
> > /dev/sdb1		/media/stick	auto
> > noauto,rw,users  0  0  
> 
> AFAIK the option to permit user mount is "user" and not "users". Could
> this cause the problem?

user and users are both valid, slightly different, options.


-- 
Neil Bothwick

In 1750 Issac Newton became discouraged when he fell up a flight of
stairs.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-31  1:38       ` Neil Bothwick
@ 2013-12-31  2:30         ` wabenbau
  2013-12-31  8:31           ` Alan McKinnon
  0 siblings, 1 reply; 26+ messages in thread
From: wabenbau @ 2013-12-31  2:30 UTC (permalink / raw
  To: gentoo-user

Am Dienstag, 31.12.2013 um 01:38
schrieb Neil Bothwick <neil@digimed.co.uk>:

> On Mon, 30 Dec 2013 17:52:56 +0100, wabenbau@gmail.com wrote:
> 
> > > For some reason or another the system doesn't like my fstab entry:
> > > /dev/sdb1		/media/stick	auto
> > > noauto,rw,users  0  0  
> > 
> > AFAIK the option to permit user mount is "user" and not "users".
> > Could this cause the problem?
> 
> user and users are both valid, slightly different, options.

THX for the info, I didn't know that.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-31  2:30         ` wabenbau
@ 2013-12-31  8:31           ` Alan McKinnon
  2013-12-31 17:45             ` wabenbau
  0 siblings, 1 reply; 26+ messages in thread
From: Alan McKinnon @ 2013-12-31  8:31 UTC (permalink / raw
  To: gentoo-user

On 31/12/2013 04:30, wabenbau@gmail.com wrote:
> Am Dienstag, 31.12.2013 um 01:38
> schrieb Neil Bothwick <neil@digimed.co.uk>:
> 
>> On Mon, 30 Dec 2013 17:52:56 +0100, wabenbau@gmail.com wrote:
>>
>>>> For some reason or another the system doesn't like my fstab entry:
>>>> /dev/sdb1		/media/stick	auto
>>>> noauto,rw,users  0  0  
>>>
>>> AFAIK the option to permit user mount is "user" and not "users".
>>> Could this cause the problem?
>>
>> user and users are both valid, slightly different, options.
> 
> THX for the info, I didn't know that.


It's all fully described in the mount man page.

You should read that man page to discover what mount can do.


-- 
Alan McKinnon
alan.mckinnon@gmail.com



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-30 17:22         ` Joseph
@ 2013-12-31  8:49           ` Alan McKinnon
  2013-12-31 16:06             ` Joseph
  0 siblings, 1 reply; 26+ messages in thread
From: Alan McKinnon @ 2013-12-31  8:49 UTC (permalink / raw
  To: gentoo-user

On 30/12/2013 19:22, Joseph wrote:
> On 12/30/13 17:36, Randolph Maaßen wrote:
> [snip]
>>>
>>> With the line in fstab:
>>>
>>> /dev/sdb1               /media/stick    auto            noauto,rw,users
>>> 0  0
>>>
>>> Some USB stick are mounted as root:root and I can not change that
>>> even as
>>> root.
>>> When I remove this like from fstab.
>>> The USB stick are mounting correctly as joseph:users owner except
>>> they have
>>> different mounting location which I don't like.
>>>
>>> -- 
>>> Joseph
>>>
>>
>> You can specify the user/group that mounts a device with some mount
>> options. I think they are uid=<username>/gid=<groupname> but I'm not
>> sure and unfortunatly not on my Linux box at the moment.
> 
> I've tried in fstab:
> /dev/sdb1               /media/stick    auto           
> noauto,uid=1000,gid=100,umask=077        0  0
> 
> but I'm getting an error:
> Error mounting system-managed device /dev/sdb1: Command-line `mount
> "/media/stick"' exited with non-zero exit status 32: mount: wrong fs
> type, bad option, bad superblock on /dev/sdb1,
> 
> What am I missing?
> 

mount cannot auto-identify the fs type on your USB stick, or /dev/sdb1
is the wrong node.

blkid as Bruce mentioned will help identify what is really going on.
Also, tail -f /var/log/messages, insert the stick, and post the entries
that produces.




-- 
Alan McKinnon
alan.mckinnon@gmail.com



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-31  8:49           ` Alan McKinnon
@ 2013-12-31 16:06             ` Joseph
  2013-12-31 16:18               ` Alan McKinnon
  2013-12-31 18:03               ` [gentoo-user] " Bruce Hill
  0 siblings, 2 replies; 26+ messages in thread
From: Joseph @ 2013-12-31 16:06 UTC (permalink / raw
  To: gentoo-user

On 12/31/13 10:49, Alan McKinnon wrote:
>On 30/12/2013 19:22, Joseph wrote:
>> On 12/30/13 17:36, Randolph Maaßen wrote:
>> [snip]
>>>>
>>>> With the line in fstab:
>>>>
>>>> /dev/sdb1               /media/stick    auto            noauto,rw,users
>>>> 0  0
>>>>
>>>> Some USB stick are mounted as root:root and I can not change that
>>>> even as
>>>> root.
>>>> When I remove this like from fstab.
>>>> The USB stick are mounting correctly as joseph:users owner except
>>>> they have
>>>> different mounting location which I don't like.
>>>>
>>>> --
>>>> Joseph
>>>>
>>>
>>> You can specify the user/group that mounts a device with some mount
>>> options. I think they are uid=<username>/gid=<groupname> but I'm not
>>> sure and unfortunatly not on my Linux box at the moment.
>>
>> I've tried in fstab:
>> /dev/sdb1               /media/stick    auto
>> noauto,uid=1000,gid=100,umask=077        0  0
>>
>> but I'm getting an error:
>> Error mounting system-managed device /dev/sdb1: Command-line `mount
>> "/media/stick"' exited with non-zero exit status 32: mount: wrong fs
>> type, bad option, bad superblock on /dev/sdb1,
>>
>> What am I missing?
>>
>
>mount cannot auto-identify the fs type on your USB stick, or /dev/sdb1
>is the wrong node.
>
>blkid as Bruce mentioned will help identify what is really going on.
>Also, tail -f /var/log/messages, insert the stick, and post the entries
>that produces.
>
>
>
>
>-- 
>Alan McKinnon
>alan.mckinnon@gmail.com

Thank you for the hints, here is the output of: tail -f /var/log/messages
My line if fstab is: 
/dev/sdb1		/media/stick	auto    	noauto,rw,user
and this USB below file are mounted as root:root (not joseph:users)

Dec 31 09:02:16 syscon7 kernel: [231771.029376] usb 8-1: new high-speed USB device number 33 using xhci_hcd
Dec 31 09:02:16 syscon7 kernel: [231771.042189] usb 8-1: default language 0x0409
Dec 31 09:02:16 syscon7 kernel: [231771.043442] usb 8-1: udev 33, busnum 8, minor = 928
Dec 31 09:02:16 syscon7 kernel: [231771.043445] usb 8-1: New USB device found, idVendor=058f, idProduct=6366
Dec 31 09:02:16 syscon7 kernel: [231771.043447] usb 8-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Dec 31 09:02:16 syscon7 kernel: [231771.043448] usb 8-1: Product: Mass Storage Device
Dec 31 09:02:16 syscon7 kernel: [231771.043450] usb 8-1: Manufacturer: Generic
Dec 31 09:02:16 syscon7 kernel: [231771.043451] usb 8-1: SerialNumber: 058F63666433
Dec 31 09:02:16 syscon7 kernel: [231771.043515] usb 8-1: usb_probe_device
Dec 31 09:02:16 syscon7 kernel: [231771.043517] usb 8-1: configuration #1 chosen from 1 choice
Dec 31 09:02:16 syscon7 kernel: [231771.043614] usb 8-1: Successful Endpoint Configure command
Dec 31 09:02:16 syscon7 kernel: [231771.043689] usb 8-1: adding 8-1:1.0 (config #1, interface 0)
Dec 31 09:02:16 syscon7 kernel: [231771.043722] usb-storage 8-1:1.0: usb_probe_interface
Dec 31 09:02:16 syscon7 kernel: [231771.043726] usb-storage 8-1:1.0: usb_probe_interface - got id
Dec 31 09:02:16 syscon7 kernel: [231771.043728] usb-storage 8-1:1.0: USB Mass Storage device detected
Dec 31 09:02:16 syscon7 kernel: [231771.043787] scsi41 : usb-storage 8-1:1.0
Dec 31 09:02:17 syscon7 kernel: [231772.175846] scsi 41:0:0:0: Direct-Access     Multiple Card  Reader     1.00 PQ: 0 ANSI: 0
Dec 31 09:02:17 syscon7 kernel: [231772.176055] sd 41:0:0:0: Attached scsi generic sg2 type 0
Dec 31 09:02:18 syscon7 kernel: [231772.836523] sd 41:0:0:0: [sdb] 62333952 512-byte logical blocks: (31.9 GB/29.7 GiB)
Dec 31 09:02:18 syscon7 kernel: [231772.836932] sd 41:0:0:0: [sdb] Write Protect is off
Dec 31 09:02:18 syscon7 kernel: [231772.836934] sd 41:0:0:0: [sdb] Mode Sense: 03 00 00 00
Dec 31 09:02:18 syscon7 kernel: [231772.837316] sd 41:0:0:0: [sdb] No Caching mode page present
Dec 31 09:02:18 syscon7 kernel: [231772.837318] sd 41:0:0:0: [sdb] Assuming drive cache: write through
Dec 31 09:02:18 syscon7 kernel: [231772.838812] sd 41:0:0:0: [sdb] No Caching mode page present
Dec 31 09:02:18 syscon7 kernel: [231772.838815] sd 41:0:0:0: [sdb] Assuming drive cache: write through
Dec 31 09:02:18 syscon7 kernel: [231772.846512]  sdb: sdb1
Dec 31 09:02:18 syscon7 kernel: [231772.848062] sd 41:0:0:0: [sdb] No Caching mode page present
Dec 31 09:02:18 syscon7 kernel: [231772.848065] sd 41:0:0:0: [sdb] Assuming drive cache: write through
Dec 31 09:02:18 syscon7 kernel: [231772.848067] sd 41:0:0:0: [sdb] Attached SCSI removable disk
Dec 31 09:02:25 syscon7 udisksd[3624]: Mounted /dev/sdb1 (system) at /media/stick on behalf of uid 1000

-- 
Joseph


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-31 16:06             ` Joseph
@ 2013-12-31 16:18               ` Alan McKinnon
  2013-12-31 22:08                 ` [gentoo-user] " walt
  2013-12-31 18:03               ` [gentoo-user] " Bruce Hill
  1 sibling, 1 reply; 26+ messages in thread
From: Alan McKinnon @ 2013-12-31 16:18 UTC (permalink / raw
  To: gentoo-user

On 31/12/2013 18:06, Joseph wrote:
> On 12/31/13 10:49, Alan McKinnon wrote:
>> On 30/12/2013 19:22, Joseph wrote:
>>> On 12/30/13 17:36, Randolph Maaßen wrote:
>>> [snip]
>>>>>
>>>>> With the line in fstab:
>>>>>
>>>>> /dev/sdb1               /media/stick    auto           
>>>>> noauto,rw,users
>>>>> 0  0
>>>>>
>>>>> Some USB stick are mounted as root:root and I can not change that
>>>>> even as
>>>>> root.
>>>>> When I remove this like from fstab.
>>>>> The USB stick are mounting correctly as joseph:users owner except
>>>>> they have
>>>>> different mounting location which I don't like.
>>>>>
>>>>> -- 
>>>>> Joseph
>>>>>
>>>>
>>>> You can specify the user/group that mounts a device with some mount
>>>> options. I think they are uid=<username>/gid=<groupname> but I'm not
>>>> sure and unfortunatly not on my Linux box at the moment.
>>>
>>> I've tried in fstab:
>>> /dev/sdb1               /media/stick    auto
>>> noauto,uid=1000,gid=100,umask=077        0  0
>>>
>>> but I'm getting an error:
>>> Error mounting system-managed device /dev/sdb1: Command-line `mount
>>> "/media/stick"' exited with non-zero exit status 32: mount: wrong fs
>>> type, bad option, bad superblock on /dev/sdb1,
>>>
>>> What am I missing?
>>>
>>
>> mount cannot auto-identify the fs type on your USB stick, or /dev/sdb1
>> is the wrong node.
>>
>> blkid as Bruce mentioned will help identify what is really going on.
>> Also, tail -f /var/log/messages, insert the stick, and post the entries
>> that produces.
>>
>>
>>
>>
>> -- 
>> Alan McKinnon
>> alan.mckinnon@gmail.com
> 
> Thank you for the hints, here is the output of: tail -f /var/log/messages
> My line if fstab is: /dev/sdb1        /media/stick    auto       
> noauto,rw,user
> and this USB below file are mounted as root:root (not joseph:users)
> 
> Dec 31 09:02:16 syscon7 kernel: [231771.029376] usb 8-1: new high-speed
> USB device number 33 using xhci_hcd
> Dec 31 09:02:16 syscon7 kernel: [231771.042189] usb 8-1: default
> language 0x0409
> Dec 31 09:02:16 syscon7 kernel: [231771.043442] usb 8-1: udev 33, busnum
> 8, minor = 928
> Dec 31 09:02:16 syscon7 kernel: [231771.043445] usb 8-1: New USB device
> found, idVendor=058f, idProduct=6366
> Dec 31 09:02:16 syscon7 kernel: [231771.043447] usb 8-1: New USB device
> strings: Mfr=1, Product=2, SerialNumber=3
> Dec 31 09:02:16 syscon7 kernel: [231771.043448] usb 8-1: Product: Mass
> Storage Device
> Dec 31 09:02:16 syscon7 kernel: [231771.043450] usb 8-1: Manufacturer:
> Generic
> Dec 31 09:02:16 syscon7 kernel: [231771.043451] usb 8-1: SerialNumber:
> 058F63666433
> Dec 31 09:02:16 syscon7 kernel: [231771.043515] usb 8-1: usb_probe_device
> Dec 31 09:02:16 syscon7 kernel: [231771.043517] usb 8-1: configuration
> #1 chosen from 1 choice
> Dec 31 09:02:16 syscon7 kernel: [231771.043614] usb 8-1: Successful
> Endpoint Configure command
> Dec 31 09:02:16 syscon7 kernel: [231771.043689] usb 8-1: adding 8-1:1.0
> (config #1, interface 0)
> Dec 31 09:02:16 syscon7 kernel: [231771.043722] usb-storage 8-1:1.0:
> usb_probe_interface
> Dec 31 09:02:16 syscon7 kernel: [231771.043726] usb-storage 8-1:1.0:
> usb_probe_interface - got id
> Dec 31 09:02:16 syscon7 kernel: [231771.043728] usb-storage 8-1:1.0: USB
> Mass Storage device detected
> Dec 31 09:02:16 syscon7 kernel: [231771.043787] scsi41 : usb-storage
> 8-1:1.0
> Dec 31 09:02:17 syscon7 kernel: [231772.175846] scsi 41:0:0:0:
> Direct-Access     Multiple Card  Reader     1.00 PQ: 0 ANSI: 0
> Dec 31 09:02:17 syscon7 kernel: [231772.176055] sd 41:0:0:0: Attached
> scsi generic sg2 type 0
> Dec 31 09:02:18 syscon7 kernel: [231772.836523] sd 41:0:0:0: [sdb]
> 62333952 512-byte logical blocks: (31.9 GB/29.7 GiB)
> Dec 31 09:02:18 syscon7 kernel: [231772.836932] sd 41:0:0:0: [sdb] Write
> Protect is off
> Dec 31 09:02:18 syscon7 kernel: [231772.836934] sd 41:0:0:0: [sdb] Mode
> Sense: 03 00 00 00
> Dec 31 09:02:18 syscon7 kernel: [231772.837316] sd 41:0:0:0: [sdb] No
> Caching mode page present
> Dec 31 09:02:18 syscon7 kernel: [231772.837318] sd 41:0:0:0: [sdb]
> Assuming drive cache: write through
> Dec 31 09:02:18 syscon7 kernel: [231772.838812] sd 41:0:0:0: [sdb] No
> Caching mode page present
> Dec 31 09:02:18 syscon7 kernel: [231772.838815] sd 41:0:0:0: [sdb]
> Assuming drive cache: write through
> Dec 31 09:02:18 syscon7 kernel: [231772.846512]  sdb: sdb1
> Dec 31 09:02:18 syscon7 kernel: [231772.848062] sd 41:0:0:0: [sdb] No
> Caching mode page present
> Dec 31 09:02:18 syscon7 kernel: [231772.848065] sd 41:0:0:0: [sdb]
> Assuming drive cache: write through
> Dec 31 09:02:18 syscon7 kernel: [231772.848067] sd 41:0:0:0: [sdb]
> Attached SCSI removable disk
> Dec 31 09:02:25 syscon7 udisksd[3624]: Mounted /dev/sdb1 (system) at
> /media/stick on behalf of uid 1000
> 


That looks normal. Having lines in fstab for removable media is not a
good solution in general - insert two sticks and the second one doesn't
have a matching line (it isn't /dev/sdb1)


That's why automounter apps were developed so you can get the config out
of fstab and replace it with something more generic somewhere else.

udisks is the app you are suing for this and it's the most common
solution chosen by most DEs.

When was udisks last updated on your system?
What was updated/installed at the last update when this problem started?

-- 
Alan McKinnon
alan.mckinnon@gmail.com



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-31  8:31           ` Alan McKinnon
@ 2013-12-31 17:45             ` wabenbau
  0 siblings, 0 replies; 26+ messages in thread
From: wabenbau @ 2013-12-31 17:45 UTC (permalink / raw
  To: gentoo-user

Am Dienstag, 31.12.2013 um 10:31
schrieb Alan McKinnon <alan.mckinnon@gmail.com>:

> On 31/12/2013 04:30, wabenbau@gmail.com wrote:
> > Am Dienstag, 31.12.2013 um 01:38
> > schrieb Neil Bothwick <neil@digimed.co.uk>:
> > 
> >> On Mon, 30 Dec 2013 17:52:56 +0100, wabenbau@gmail.com wrote:
> >>
> >>>> For some reason or another the system doesn't like my fstab
> >>>> entry: /dev/sdb1		/media/stick	auto
> >>>> noauto,rw,users  0  0  
> >>>
> >>> AFAIK the option to permit user mount is "user" and not "users".
> >>> Could this cause the problem?
> >>
> >> user and users are both valid, slightly different, options.
> > 
> > THX for the info, I didn't know that.
> 
> 
> It's all fully described in the mount man page.
> 
> You should read that man page to discover what mount can do.

THX for the hint. It's always good to RTFM. :-)

In the meantime I read the man page and now I understand the difference
between the "users" and the "user" option. But as I'm the only physical
user on my computer it doesn't makes a difference for me.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-31 16:06             ` Joseph
  2013-12-31 16:18               ` Alan McKinnon
@ 2013-12-31 18:03               ` Bruce Hill
  2014-01-01  2:14                 ` Joseph
  1 sibling, 1 reply; 26+ messages in thread
From: Bruce Hill @ 2013-12-31 18:03 UTC (permalink / raw
  To: gentoo-user

On Tue, Dec 31, 2013 at 09:06:38AM -0700, Joseph wrote:
> 
> Thank you for the hints, here is the output of: tail -f /var/log/messages
> My line if fstab is: 
> /dev/sdb1		/media/stick	auto    	noauto,rw,user
> and this USB below file are mounted as root:root (not joseph:users)
> 
> Dec 31 09:02:16 syscon7 kernel: [231771.029376] usb 8-1: new high-speed USB device number 33 using xhci_hcd
> Dec 31 09:02:16 syscon7 kernel: [231771.042189] usb 8-1: default language 0x0409
> Dec 31 09:02:16 syscon7 kernel: [231771.043442] usb 8-1: udev 33, busnum 8, minor = 928
> Dec 31 09:02:16 syscon7 kernel: [231771.043445] usb 8-1: New USB device found, idVendor=058f, idProduct=6366
> Dec 31 09:02:16 syscon7 kernel: [231771.043447] usb 8-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> Dec 31 09:02:16 syscon7 kernel: [231771.043448] usb 8-1: Product: Mass Storage Device
> Dec 31 09:02:16 syscon7 kernel: [231771.043450] usb 8-1: Manufacturer: Generic
> Dec 31 09:02:16 syscon7 kernel: [231771.043451] usb 8-1: SerialNumber: 058F63666433
> Dec 31 09:02:16 syscon7 kernel: [231771.043515] usb 8-1: usb_probe_device
> Dec 31 09:02:16 syscon7 kernel: [231771.043517] usb 8-1: configuration #1 chosen from 1 choice
> Dec 31 09:02:16 syscon7 kernel: [231771.043614] usb 8-1: Successful Endpoint Configure command
> Dec 31 09:02:16 syscon7 kernel: [231771.043689] usb 8-1: adding 8-1:1.0 (config #1, interface 0)
> Dec 31 09:02:16 syscon7 kernel: [231771.043722] usb-storage 8-1:1.0: usb_probe_interface
> Dec 31 09:02:16 syscon7 kernel: [231771.043726] usb-storage 8-1:1.0: usb_probe_interface - got id
> Dec 31 09:02:16 syscon7 kernel: [231771.043728] usb-storage 8-1:1.0: USB Mass Storage device detected
> Dec 31 09:02:16 syscon7 kernel: [231771.043787] scsi41 : usb-storage 8-1:1.0
> Dec 31 09:02:17 syscon7 kernel: [231772.175846] scsi 41:0:0:0: Direct-Access     Multiple Card  Reader     1.00 PQ: 0 ANSI: 0
> Dec 31 09:02:17 syscon7 kernel: [231772.176055] sd 41:0:0:0: Attached scsi generic sg2 type 0
> Dec 31 09:02:18 syscon7 kernel: [231772.836523] sd 41:0:0:0: [sdb] 62333952 512-byte logical blocks: (31.9 GB/29.7 GiB)
> Dec 31 09:02:18 syscon7 kernel: [231772.836932] sd 41:0:0:0: [sdb] Write Protect is off
> Dec 31 09:02:18 syscon7 kernel: [231772.836934] sd 41:0:0:0: [sdb] Mode Sense: 03 00 00 00
> Dec 31 09:02:18 syscon7 kernel: [231772.837316] sd 41:0:0:0: [sdb] No Caching mode page present
> Dec 31 09:02:18 syscon7 kernel: [231772.837318] sd 41:0:0:0: [sdb] Assuming drive cache: write through
> Dec 31 09:02:18 syscon7 kernel: [231772.838812] sd 41:0:0:0: [sdb] No Caching mode page present
> Dec 31 09:02:18 syscon7 kernel: [231772.838815] sd 41:0:0:0: [sdb] Assuming drive cache: write through
> Dec 31 09:02:18 syscon7 kernel: [231772.846512]  sdb: sdb1
> Dec 31 09:02:18 syscon7 kernel: [231772.848062] sd 41:0:0:0: [sdb] No Caching mode page present
> Dec 31 09:02:18 syscon7 kernel: [231772.848065] sd 41:0:0:0: [sdb] Assuming drive cache: write through
> Dec 31 09:02:18 syscon7 kernel: [231772.848067] sd 41:0:0:0: [sdb] Attached SCSI removable disk
> Dec 31 09:02:25 syscon7 udisksd[3624]: Mounted /dev/sdb1 (system) at /media/stick on behalf of uid 1000
> 
> -- 
> Joseph

The blkid output would have shown this device, it's UUID, and filesystem.

At any rate, for my flash drives I want them mounted with perms for rw for
user mingdao, so I put something like this in /etc/fstab:

baruch ~ # blkid /dev/sdc1
/dev/sdc1: LABEL="AMD" UUID="CA00-9136" TYPE="vfat" 
baruch ~ # grep CA00-9136 /etc/fstab
UUID=CA00-9136    				/AMD	vfat	noauto,users,rw,gid=1000,dmask=0002,fmask=0113  0 0

Different for NTFS, of course. And btw, I don't automount anything anything
that is plugged in. Just my preference.

As Alan mentioned, "man mount" would be a good read; as well as "man fstab".
And, did I give you a link to an article on file permissions?

The difference between user and users mean simply that with "user" only the
user who mounted the device can unmount it; with "users" any user can unmount
it, not just the user who mounted it.

Cheers,
Bruce
-- 
List replies preferred.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

Don't top-post: http://en.wikipedia.org/wiki/Top_post#Top-posting


^ permalink raw reply	[flat|nested] 26+ messages in thread

* [gentoo-user] Re: USB permission/owner - change not allowed as root
  2013-12-31 16:18               ` Alan McKinnon
@ 2013-12-31 22:08                 ` walt
  2013-12-31 22:49                   ` »Q«
  0 siblings, 1 reply; 26+ messages in thread
From: walt @ 2013-12-31 22:08 UTC (permalink / raw
  To: gentoo-user

On 12/31/2013 08:18 AM, Alan McKinnon wrote:
> That looks normal. Having lines in fstab for removable media is not a
> good solution in general - insert two sticks and the second one doesn't
> have a matching line (it isn't /dev/sdb1)

Having a dos label on a memory stick allows you to mount it using the
usual LABEL='mylabel' syntax, which is independent of the device name.

sys-fs/dosfstools includes dosfslabel, which lets you put a disk label
on a vfat-formatted memory stick.

Since I stopped using consolekit (Canek talked me into it ;) I've had
to authenticate as root for several things that were transparent before,
like mounting removable drives and rebooting/powering-off the computer.

While security is always annoying, I think the new behavior is probably
better because it's non-M$ behavior and therefore safer.


^ permalink raw reply	[flat|nested] 26+ messages in thread

* [gentoo-user] Re: USB permission/owner - change not allowed as root
  2013-12-31 22:08                 ` [gentoo-user] " walt
@ 2013-12-31 22:49                   ` »Q«
  0 siblings, 0 replies; 26+ messages in thread
From: »Q« @ 2013-12-31 22:49 UTC (permalink / raw
  To: gentoo-user

On Tue, 31 Dec 2013 14:08:18 -0800
walt <w41ter@gmail.com> wrote:

> sys-fs/dosfstools includes dosfslabel, which lets you put a disk label
> on a vfat-formatted memory stick.

Thanks for this!  I had been using mtools, which works, but dosfslabel
is much less annoying to use.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2013-12-31 18:03               ` [gentoo-user] " Bruce Hill
@ 2014-01-01  2:14                 ` Joseph
  2014-01-01  8:19                   ` Neil Bothwick
  0 siblings, 1 reply; 26+ messages in thread
From: Joseph @ 2014-01-01  2:14 UTC (permalink / raw
  To: gentoo-user

On 12/31/13 12:03, Bruce Hill wrote:

[snip]
>
>The blkid output would have shown this device, it's UUID, and filesystem.
>
>At any rate, for my flash drives I want them mounted with perms for rw for
>user mingdao, so I put something like this in /etc/fstab:
>
>baruch ~ # blkid /dev/sdc1
>/dev/sdc1: LABEL="AMD" UUID="CA00-9136" TYPE="vfat"
>baruch ~ # grep CA00-9136 /etc/fstab
>UUID=CA00-9136    				/AMD	vfat	noauto,users,rw,gid=1000,dmask=0002,fmask=0113  0 0
>
>Different for NTFS, of course. And btw, I don't automount anything anything
>that is plugged in. Just my preference.
>
>As Alan mentioned, "man mount" would be a good read; as well as "man fstab".
>And, did I give you a link to an article on file permissions?
>
>The difference between user and users mean simply that with "user" only the
>user who mounted the device can unmount it; with "users" any user can unmount
>it, not just the user who mounted it.
>
>Cheers,
>Bruce

Thanks for the input.
In my case "blkid" is not showing any LABEL

It depends on what USB I insert:

#blkid /dev/sdb1
/dev/sdb1: UUID="2f5fc53e-4f4c-4e74-b9c4-fca316b47fea" TYPE="ext2"

#blkid 
/dev/sdb1: UUID="3136-3934" TYPE="vfat"

so it would be hard to specify UUID in fstab for each momory card I insert.
In the past the line in fstab:
/dev/sdb1		/media/stick	auto    	noauto,rw,users        0  0

mounted both "ext2" and "vfat" USB as /media/stick so it is easier to reference to it in scripts.
But after recent update if I have this line in fstab the "ext2" USB is mounted as joseph:users 
but "vfat" USB is mounted as "root:root" 

If I remove the mounting line from fstab they mount with correct permission "joseph:users" but the mount point is reference as UUID and it makes it hard to reference 
it in bash scripts. 

-- 
Joseph


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [gentoo-user] USB permission/owner - change not allowed as root
  2014-01-01  2:14                 ` Joseph
@ 2014-01-01  8:19                   ` Neil Bothwick
  0 siblings, 0 replies; 26+ messages in thread
From: Neil Bothwick @ 2014-01-01  8:19 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 867 bytes --]

On Tue, 31 Dec 2013 19:14:36 -0700, Joseph wrote:

> If I remove the mounting line from fstab they mount with correct
> permission "joseph:users" but the mount point is reference as UUID and
> it makes it hard to reference it in bash scripts. 

MOUNTPOINT=$(mount | awk '/^\/dev\/sdb1/ {print $3}')

Then you can let the automounter take care of everything for you. If you
use /etc/fstab, the device is mounted as root, but because you have a
mixture of filesystems you can specify the correct options for one
without breaking another. It is far simpler to let the automounter take
care of all of this and just handle the movable mount point.

There is probably a udisks option that sets the mount point to the device
name rather than the volume name or UUID, good luck finding it :)


-- 
Neil Bothwick

Exercise daily. Eat wisely. Die anyway.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2014-01-01  8:19 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-30  2:42 [gentoo-user] USB permission/owner - change not allowed as root Joseph
2013-12-30  3:41 ` Dale
2013-12-30  3:56   ` Joseph
2013-12-30  4:05     ` covici
2013-12-30  4:14       ` Joseph
2013-12-30  4:12   ` Joseph
2013-12-30 16:52     ` wabenbau
2013-12-31  1:38       ` Neil Bothwick
2013-12-31  2:30         ` wabenbau
2013-12-31  8:31           ` Alan McKinnon
2013-12-31 17:45             ` wabenbau
2013-12-30  7:51 ` Edward M
2013-12-30  8:38   ` Alan McKinnon
2013-12-30  9:41     ` Edward M
2013-12-30 16:32     ` Joseph
2013-12-30 16:36       ` Randolph Maaßen
2013-12-30 17:22         ` Joseph
2013-12-31  8:49           ` Alan McKinnon
2013-12-31 16:06             ` Joseph
2013-12-31 16:18               ` Alan McKinnon
2013-12-31 22:08                 ` [gentoo-user] " walt
2013-12-31 22:49                   ` »Q«
2013-12-31 18:03               ` [gentoo-user] " Bruce Hill
2014-01-01  2:14                 ` Joseph
2014-01-01  8:19                   ` Neil Bothwick
2013-12-30 18:06 ` Bruce Hill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox