All of lore.kernel.org
 help / color / mirror / Atom feed
* Mounting tmpfs with symbolic gid doesn't work
@ 2007-01-11 11:38 Robert Schwebel
  2007-01-11 13:50 ` Hugh Dickins
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Schwebel @ 2007-01-11 11:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: viro, Bjoern Buerger

Hi,

Mounting tmpfs with gid=<symbolic-group> doesn't work on recent kernels
any more; the same with uid=<symbolic-username> works fine:

rsc@isonoe:~$ mkdir troet
rsc@isonoe:~$ sudo mount -t tmpfs -ogid=rsc none troet/
mount: wrong fs type, bad option, bad superblock on none,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
rsc@isonoe:~/svn/ptxdist-trunk$ dmesg | tail -n 1 
tmpfs: Bad value 'rsc' for mount option 'gid'
rsc@isonoe:~$ sudo mount -t tmpfs -ogid=1006 none troet/
rsc@isonoe:~$ mount | grep troet
none on /home/rsc/troet type tmpfs (rw,gid=1006)
rsc@isonoe:~$ ls -ld troet/
drwxrwxrwt 2 root 1006 40 Jan 11 12:32 troet/
rsc@isonoe:~$ sudo umount troet/
rsc@isonoe:~$ sudo mount -t tmpfs -ouid=1006 none troet/
rsc@isonoe:~$ sudo umount troet/
rsc@isonoe:~$ sudo mount -t tmpfs -ouid=rsc none troet/
rsc@isonoe:~$ ls -ld troet/
drwxrwxrwt 2 rsc root 40 Jan 11 12:33 troet/
rsc@isonoe:~$ sudo umount troet/

Tested with 2.6.19-rc6, the behaviour seems to have worked until at
least 2.6.16. Does anyone have an idea?

Robert
-- 
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hannoversche Str. 2, 31134 Hildesheim, Germany
   Phone: +49-5121-206917-0 |  Fax: +49-5121-206917-9


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

* Re: Mounting tmpfs with symbolic gid doesn't work
  2007-01-11 11:38 Mounting tmpfs with symbolic gid doesn't work Robert Schwebel
@ 2007-01-11 13:50 ` Hugh Dickins
  0 siblings, 0 replies; 2+ messages in thread
From: Hugh Dickins @ 2007-01-11 13:50 UTC (permalink / raw)
  To: Robert Schwebel; +Cc: linux-kernel, viro, Bjoern Buerger

On Thu, 11 Jan 2007, Robert Schwebel wrote:
> 
> Mounting tmpfs with gid=<symbolic-group> doesn't work on recent kernels
> any more; the same with uid=<symbolic-username> works fine:
> 
> rsc@isonoe:~$ mkdir troet
> rsc@isonoe:~$ sudo mount -t tmpfs -ogid=rsc none troet/
> mount: wrong fs type, bad option, bad superblock on none,
>        missing codepage or other error
>        In some cases useful info is found in syslog - try
>        dmesg | tail  or so
> rsc@isonoe:~/svn/ptxdist-trunk$ dmesg | tail -n 1 
> tmpfs: Bad value 'rsc' for mount option 'gid'
> rsc@isonoe:~$ sudo mount -t tmpfs -ogid=1006 none troet/
> rsc@isonoe:~$ mount | grep troet
> none on /home/rsc/troet type tmpfs (rw,gid=1006)
> rsc@isonoe:~$ ls -ld troet/
> drwxrwxrwt 2 root 1006 40 Jan 11 12:32 troet/
> rsc@isonoe:~$ sudo umount troet/
> rsc@isonoe:~$ sudo mount -t tmpfs -ouid=1006 none troet/
> rsc@isonoe:~$ sudo umount troet/
> rsc@isonoe:~$ sudo mount -t tmpfs -ouid=rsc none troet/
> rsc@isonoe:~$ ls -ld troet/
> drwxrwxrwt 2 rsc root 40 Jan 11 12:33 troet/
> rsc@isonoe:~$ sudo umount troet/
> 
> Tested with 2.6.19-rc6, the behaviour seems to have worked until at
> least 2.6.16. Does anyone have an idea?

Works fine for me here on 2.6.16 or 2.6.19 or 2.6.20-rc4
(though I tried with "mail" rather than "rsc" ;)

Whatever, I think it's not a kernel problem: tmpfs itself only handles
numeric gid, I believe it's the job of the userspace end of mount to
convert symbolic uid or gid to numeric uid or gid for the kernel mount.

Looking through what you've tried above, I'm guessing that "rsc" is
your symbolic uid, but you're expecting there to be a group of that
name - perhaps there is not?  perhaps since 2.6.16 you switched from
a distro which makes a group for each user to a distro which does not?

Hugh

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

end of thread, other threads:[~2007-01-11 13:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-11 11:38 Mounting tmpfs with symbolic gid doesn't work Robert Schwebel
2007-01-11 13:50 ` Hugh Dickins

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.