On Tue, 4 Apr 2000, Trevor Astrope wrote:

> Hello,
> 
> I wish to have a separate partition for postgresql, but when I mount
> /var/lib/pgsql, the mount point becomes owned by root. Is there anyway to
> have fstab configured so the /var/lib/pgsql mount point is owned by the
> postgres user?
> 
> Regards,
> 
> Trevor Astrope
> [EMAIL PROTECTED]
> 

Hey Trevor,

        the ownership of a mount point comes from the root inode of the
mounted filesystem.  A bit confusing cause once the file system is mounted
it's hard to tell the differences between the mount point's directory
inode and the mounted root inode.

[root@localhost]# ls -ld /mnt/tmp
drwxr-xr-x   2 root     root         1024 Dec 26 23:22 /mnt/tmp
[root@localhost]# mount /dev/hda2 /mnt/tmp
[root@localhost]# ls -ld /mnt/tmp
drwxr-xr-x   6 root     root         4096 Apr  4 04:31 /mnt/tmp
[root@localhost]# chown nobody:nobody /mnt/tmp
[root@localhost]# ls -ld /mnt/tmp
drwxr-xr-x   6 nobody   nobody       4096 Apr  4 04:31 /mnt/tmp
[root@localhost]# umount /mnt/tmp
[root@localhost]# ls -ld /mnt/tmp
drwxr-xr-x   2 root     root         1024 Dec 26 23:22 /mnt/tmp
[root@localhost]# mount /dev/hda2 /mnt/tmp
[root@localhost]# ls -ld /mnt/tmp
drwxr-xr-x   6 nobody   nobody       4096 Apr  4 04:31 /mnt/tmp
[root@localhost]#

        Anyway... just do the chown on /var/lib/pgsql once the partition
has already been mounted and it will 'remember' it from then on.

M.



-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to