Re: [gentoo-user] permissions, fstab and LVM

2007-10-09 Thread Dirk Heinrichs
Am Dienstag, 9. Oktober 2007 schrieb ext Alexander Skwar:
 Dirk Heinrichs [EMAIL PROTECTED] wrote:
  Am Montag, 8. Oktober 2007 schrieb Thufir:
 
  Read my first response again: In fstab you specify who can _mount_ a
  volume. In the _mounted_ volumes filesystem, you specify access rights
  using chmod, chgrp, chown or, if using ACLs, setfacl.

 And if you don't want to do that, maybe switch the filesystemtype
 to something like VFAT? This way, you don't have to worry about
 permissions anymore and can specify the owner in fstab.

Hmm, this would still be restricted to _one_ user, who then owns all files. 
Even if users is in fstab instead of uid=... the mounting user would 
own all files until he umounts and another user can mount it. Using ACLs on 
a Unix filesystem is the most flexible.

  Wnat is meant by mounting the volume recursively, please?
 
  Don't know, didn't write that. I wrote: ...mount, then (recursively)
  change permissions...

 Well, the then was missing :)

Oops, yes.

Bye...

Dirk
-- 
Dirk Heinrichs  | Tel:  +49 (0)162 234 3408
Configuration Manager   | Fax:  +49 (0)211 47068 111
Capgemini Deutschland   | Mail: [EMAIL PROTECTED]
Wanheimerstraße 68  | Web:  http://www.capgemini.com
D-40468 Düsseldorf  | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net


signature.asc
Description: This is a digitally signed message part.


[gentoo-user] permissions, fstab and LVM

2007-10-08 Thread Thufir
I seem to have the permissions wrong in fstab.  On boot I do have an icon 
on the desktop for the LVM volume, which can be browsed as root, but not 
as a user.

I want read/write permissions to the LVM volume as user thufir (or any 
user, really).  Can this be done?


arrakis ~ # 
arrakis ~ # fdisk /dev/hda

The number of cylinders for this disk is set to 9729.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot  Start End  Blocks   Id  System
/dev/hda1   1191215358108+  83  Linux
/dev/hda219131925  104422+  83  Linux
/dev/hda31926972962685630   8e  Linux LVM

Command (m for help): q

arrakis ~ # 
arrakis ~ # fdisk /dev/hdb

The number of cylinders for this disk is set to 59582.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/hdb: 30.7 GB, 30750031872 bytes
16 heads, 63 sectors/track, 59582 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot  Start End  Blocks   Id  System
/dev/hdb1   1 203  102280+  83  Linux
/dev/hdb2 2042109  960624   82  Linux swap / 
Solaris
/dev/hdb32110   5957928964880   83  Linux

Command (m for help): q

arrakis ~ # 
arrakis ~ # cat lvm.txt 

#load device module
modprobe dm-mod
#change the volumes that exist to active
vgchange -ay
#mount the logical partition
mkdir -p /mnt/VolGroup00/LogVol00
mount /dev/VolGroup00/LogVol00 /mnt/VolGroup00/LogVol00
arrakis ~ # 
arrakis ~ # cat /etc/fstab
/dev/hdb1/boot   ext2defaults1 2
/dev/hdb2noneswapsw  0 0
/dev/hdb3/   ext3noatime 0 1
none/proc procdefaults  0 0
none/dev/shm  tmpfs   defaults  0 0
/dev/VolGroup00/LogVol00/mnt/VolGroup00/LogVol00ext3
users,rw0 0

arrakis ~ # 
arrakis ~ # su thufir
[EMAIL PROTECTED] /root $ cd
[EMAIL PROTECTED] ~ $ 
[EMAIL PROTECTED] ~ $ ll /mnt/VolGroup00/LogVol00/home/thufir/
ls: cannot open directory /mnt/VolGroup00/LogVol00/home/thufir/: 
Permission denied
[EMAIL PROTECTED] ~ $ 
[EMAIL PROTECTED] ~ $ whoami
thufir
[EMAIL PROTECTED] ~ $ 
[EMAIL PROTECTED] ~ $ ll /home/thufir/Desktop/
total 0
[EMAIL PROTECTED] ~ $ 
[EMAIL PROTECTED] ~ $ 
[EMAIL PROTECTED] ~ $ date
Mon Oct  8 01:16:52 PDT 2007
[EMAIL PROTECTED] ~ $ 
[EMAIL PROTECTED] ~ $ 

arrakis ~ # 
arrakis ~ # fdisk /dev/hda

The number of cylinders for this disk is set to 9729.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot  Start End  Blocks   Id  System
/dev/hda1   1191215358108+  83  Linux
/dev/hda219131925  104422+  83  Linux
/dev/hda31926972962685630   8e  Linux LVM

Command (m for help): q

arrakis ~ # 
arrakis ~ # fdisk /dev/hdb

The number of cylinders for this disk is set to 59582.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/hdb: 30.7 GB, 30750031872 bytes
16 heads, 63 sectors/track, 59582 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot  Start End  Blocks   Id  System
/dev/hdb1   1 203  102280+  83  Linux
/dev/hdb2 2042109  960624   82  Linux swap / 
Solaris
/dev/hdb32110   5957928964880   83  Linux

Command (m for help): q

arrakis ~ # 
arrakis ~ # cat lvm.txt 

#load device module
modprobe dm-mod
#change the volumes that exist to active
vgchange -ay
#mount the logical partition
mkdir -p /mnt/VolGroup00/LogVol00
mount /dev/VolGroup00/LogVol00 /mnt/VolGroup00/LogVol00
arrakis ~ # 
arrakis ~ # cat /etc/fstab
/dev/hdb1/boot   ext2  

Re: [gentoo-user] permissions, fstab and LVM

2007-10-08 Thread Dirk Heinrichs
Am Montag, 8. Oktober 2007 schrieb ext Thufir:
 I seem to have the permissions wrong in fstab.  On boot I do have an icon
 on the desktop for the LVM volume, which can be browsed as root, but not
 as a user.

 I want read/write permissions to the LVM volume as user thufir (or any
 user, really).  Can this be done?

Yes. Mount it, (recursivly) change the group of the top level directory and 
give group write permissions, then add all users which should have full 
access to that group (they need to logout/login to change their group 
membership information).

You could also add ACL entries to it for more fine grained control (i.e. 
allow full access for user thufir, but only read access for janedoe).

See man pages of chmod, chgrp, setfacl, getfacl. For ACLs to work make sure 
the filesystem module in question is compiled with proper ACL support (i.e. 
CONFIG_EXT3_FS_POSIX_ACL=y).

 arrakis ~ # cat /etc/fstab
 /dev/VolGroup00/LogVol00        /mnt/VolGroup00/LogVol00        ext3    
 users,rw        0 0

This just means that normal users can _mount_ the volume. Access is granted 
based on filesystem permissions.

 arrakis ~ #
 arrakis ~ # su thufir
 [EMAIL PROTECTED] /root $ cd
 [EMAIL PROTECTED] ~ $
 [EMAIL PROTECTED] ~ $ ll /mnt/VolGroup00/LogVol00/home/thufir/
 ls: cannot open directory /mnt/VolGroup00/LogVol00/home/thufir/:
 Permission denied

What are the permissions of /mnt/VolGroup00/LogVol00/home/thufir (as root: 
ll -d /mnt/VolGroup00/LogVol00/home/thufir)?

Bye...

Dirk
-- 
Dirk Heinrichs  | Tel:  +49 (0)162 234 3408
Configuration Manager   | Fax:  +49 (0)211 47068 111
Capgemini Deutschland   | Mail: [EMAIL PROTECTED]
Wanheimerstraße 68  | Web:  http://www.capgemini.com
D-40468 Düsseldorf  | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net


signature.asc
Description: This is a digitally signed message part.