linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] lvm ownership of special access node
@ 2009-05-02 17:00 sebastian muniz
  2009-05-02 19:44 ` Lars Ellenberg
  0 siblings, 1 reply; 3+ messages in thread
From: sebastian muniz @ 2009-05-02 17:00 UTC (permalink / raw)
  To: linux-lvm

Hello list.
First post. Sorry  if this has already been discussed. I have search a 
while with no luck.
I need to mount a home directory for a user from a lvolume.
For instance, I created
  ACTIVE            '/dev/vg1/sebahome' [5.00 GB] inherit

and need it mounted on /home/seba
However, when I mount it on /home/seba permissions get root:root

orion:~# ls -ld /home/seba
drwxr-xr-x 4 root root 4096 2009-05-02 02:34 /home/seba

I think that

seba@orion:~$ ls -la /dev/vg1/sebahome
lrwxrwxrwx 1 root root 24 2009-05-02 04:25 /dev/vg1/sebahome -> 
/dev/mapper/vg1-sebahome
seba@orion:~$ ls -la /dev/mapper/vg1-sebahome
brw-rw---- 1 root disk 254, 3 2009-05-02 04:25 /dev/mapper/vg1-sebahome

is the reason.
Is there any way to create the special access node with other owner:group
like the
vxassist --user --group in veritas?
Or is there any mount option I am now aware of?

Thanks in advance,
Sebastian Mu�iz

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

* Re: [linux-lvm] lvm ownership of special access node
  2009-05-02 17:00 [linux-lvm] lvm ownership of special access node sebastian muniz
@ 2009-05-02 19:44 ` Lars Ellenberg
  2009-05-03  8:50   ` Georges Giralt
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ellenberg @ 2009-05-02 19:44 UTC (permalink / raw)
  To: linux-lvm

On Sat, May 02, 2009 at 02:00:20PM -0300, sebastian muniz wrote:
> Hello list.
> First post. Sorry  if this has already been discussed. I have search a  
> while with no luck.
> I need to mount a home directory for a user from a lvolume.
> For instance, I created
>  ACTIVE            '/dev/vg1/sebahome' [5.00 GB] inherit
>
> and need it mounted on /home/seba
> However, when I mount it on /home/seba permissions get root:root
>
> orion:~# ls -ld /home/seba
> drwxr-xr-x 4 root root 4096 2009-05-02 02:34 /home/seba
>
> I think that
>
> seba@orion:~$ ls -la /dev/vg1/sebahome
> lrwxrwxrwx 1 root root 24 2009-05-02 04:25 /dev/vg1/sebahome ->  
> /dev/mapper/vg1-sebahome
> seba@orion:~$ ls -la /dev/mapper/vg1-sebahome
> brw-rw---- 1 root disk 254, 3 2009-05-02 04:25 /dev/mapper/vg1-sebahome
>
> is the reason.
> Is there any way to create the special access node with other owner:group
> like the
> vxassist --user --group in veritas?
> Or is there any mount option I am now aware of?

mount /dev/vg1/sebahome /home/seba
chown owner:group /home/seba

should do the trick ;-)

once a file system gets mounted,
the ownership of its "/" overrides the ownership of the mount point.

	Lars

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD� and LINBIT� are registered trademarks of LINBIT, Austria.

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

* Re: [linux-lvm] lvm ownership of special access node
  2009-05-02 19:44 ` Lars Ellenberg
@ 2009-05-03  8:50   ` Georges Giralt
  0 siblings, 0 replies; 3+ messages in thread
From: Georges Giralt @ 2009-05-03  8:50 UTC (permalink / raw)
  To: LVM general discussion and development

Lars Ellenberg a �crit :
> On Sat, May 02, 2009 at 02:00:20PM -0300, sebastian muniz wrote:
>> Hello list.
>> First post. Sorry  if this has already been discussed. I have search a  
>> while with no luck.
>> I need to mount a home directory for a user from a lvolume.
>> For instance, I created
>>  ACTIVE            '/dev/vg1/sebahome' [5.00 GB] inherit
>>
>> and need it mounted on /home/seba
>> However, when I mount it on /home/seba permissions get root:root
>>
>> orion:~# ls -ld /home/seba
>> drwxr-xr-x 4 root root 4096 2009-05-02 02:34 /home/seba
>>
>> I think that
>>
>> seba@orion:~$ ls -la /dev/vg1/sebahome
>> lrwxrwxrwx 1 root root 24 2009-05-02 04:25 /dev/vg1/sebahome ->  
>> /dev/mapper/vg1-sebahome
>> seba@orion:~$ ls -la /dev/mapper/vg1-sebahome
>> brw-rw---- 1 root disk 254, 3 2009-05-02 04:25 /dev/mapper/vg1-sebahome
>>
>> is the reason.
>> Is there any way to create the special access node with other owner:group
>> like the
>> vxassist --user --group in veritas?
>> Or is there any mount option I am now aware of?
> 
> mount /dev/vg1/sebahome /home/seba
> chown owner:group /home/seba
> 
> should do the trick ;-)
> 
> once a file system gets mounted,
> the ownership of its "/" overrides the ownership of the mount point.
> 
> 	Lars
> 
Hi !
It is good practice to give root only access to the mount point BEFORe 
it is mounted and user's full ownership of the mounted filesystem.
This way, if the file system is not mounted for any reason, the user 
won't be allowed to create any file under the mount point and you'll 
know becaus he WILL complain....
Hope this helps.

-- 
If the only tool you have is a hammer, you tend to see every problem as 
a nail.
                 Abraham Maslow
A British variant :
Any tool can serve as a hammer but a screwdriver makes the best chisel.

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

end of thread, other threads:[~2009-05-03  8:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-02 17:00 [linux-lvm] lvm ownership of special access node sebastian muniz
2009-05-02 19:44 ` Lars Ellenberg
2009-05-03  8:50   ` Georges Giralt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).