Hi Everyone,
I have got CentOS 64bit running on a Dell PowerEdge SC1850 with hardware raid 1. My LVM partions donot seem to honour chown commands for symbolic links. Is this normal? All other files and directories honour it.
On Thu, 2006-08-31 at 18:29 +1000, Devraj Mukherjee wrote:
Hi Everyone,
I have got CentOS 64bit running on a Dell PowerEdge SC1850 with hardware raid 1. My LVM partions donot seem to honour chown commands for symbolic links. Is this normal? All other files and directories honour it.
IIRC, symlinks never take any other ownership or group or permissions. Makes sense if you think in terms of security being provided by those attributes of the target. Regardless of symlink settings, what would happen if target attributes were changed and owner of symlink changed its attributes? Who rules the roost? If you own the file, you may not even know that someone created a symlink. You don't know the symlink owner is spying/corrupting/spreading your data.
That assumes basic access control.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Thu, 2006-08-31 at 07:54 -0400, William L. Maltby wrote:
On Thu, 2006-08-31 at 18:29 +1000, Devraj Mukherjee wrote:
Hi Everyone,
I have got CentOS 64bit running on a Dell PowerEdge SC1850 with hardware raid 1. My LVM partions donot seem to honour chown commands for symbolic links. Is this normal? All other files and directories honour it.
Suddenly, this stuck me as being out-of-kilter. Can you demonstrate this? I went to my /boot, non-LVM, and did this test.
# cd /boot # ls boot.b initrd-2.6.9-42.0.2.EL.img <snip>
# ln -s boot.b myboot.b # ls -l boot.b myboot.b -rw-r--r-- 1 root root 5824 Feb 21 2005 boot.b lrwxrwxrwx 1 root root 6 Aug 31 08:04 myboot.b -> boot.b # chown wild-bill myhtl # ls -l boot.b myboot.b -rw-r--r-- 1 wild-bill root 5824 Feb 21 2005 boot.b lrwxrwxrwx 1 root root 6 Aug 31 08:04 myboot.b -> boot.b
The symlink is unchanged. Trying the same on an LVM file.
# cd /tmp # ls <snip>
htl RowenaSectors01_24 xses-wild-bill.o8P5FC keyring-fsh1eg RowenaSectors33_2880 # ln -s htl myhtl # ls -l *htl* -rw-rw-r-- 1 hardtolove hardtolove 1514 Aug 29 20:59 htl lrwxrwxrwx 1 root root 3 Aug 31 08:09 myhtl -> htl # chown wild-bill myhtl # ls -l *htl* -rw-rw-r-- 1 wild-bill root 1514 Aug 29 20:59 htl lrwxrwxrwx 1 root root 3 Aug 31 08:09 myhtl -> htl
So, here LVM and non-LVM work the same. Any chance that the volume is mounted ro? Or that the attribute of the logical volume is ro? I found out there is a bug (IMO) that won't re-read the attribute until a re-boot (not documented in previous versions, don't know if it is in current version).
I suspect that I misunderstood your original complaint now.
Either way, another consideration is that basic security concerns have prevented users other than root from giving files to others for many years now.
IIRC, symlinks never take any other ownership or group or permissions.
<snip>
HTH -- Bill
On Aug 31, 2006, at 8:29 AM, William L. Maltby wrote:
On Thu, 2006-08-31 at 07:54 -0400, William L. Maltby wrote:
On Thu, 2006-08-31 at 18:29 +1000, Devraj Mukherjee wrote:
Hi Everyone,
I have got CentOS 64bit running on a Dell PowerEdge SC1850 with hardware raid 1. My LVM partions donot seem to honour chown commands for symbolic links. Is this normal? All other files and directories honour it.
Suddenly, this stuck me as being out-of-kilter. Can you demonstrate this? I went to my /boot, non-LVM, and did this test.
# cd /boot # ls boot.b initrd-2.6.9-42.0.2.EL.img
<snip>
# ln -s boot.b myboot.b # ls -l boot.b myboot.b -rw-r--r-- 1 root root 5824 Feb 21 2005 boot.b lrwxrwxrwx 1 root root 6 Aug 31 08:04 myboot.b -> boot.b # chown wild-bill myhtl # ls -l boot.b myboot.b -rw-r--r-- 1 wild-bill root 5824 Feb 21 2005 boot.b lrwxrwxrwx 1 root root 6 Aug 31 08:04 myboot.b -> boot.b
The symlink is unchanged. Trying the same on an LVM file.
# cd /tmp # ls
<snip> > <snip>
HTH
Bill
chown -h or chown --no-dereference
will change the ownership of the link source instead of the target (regardless of LVM)
Tony Schreiner
On Thu, 2006-08-31 at 12:55 -0400, Tony Schreiner wrote:
On Aug 31, 2006, at 8:29 AM, William L. Maltby wrote:
On Thu, 2006-08-31 at 07:54 -0400, William L. Maltby wrote:
On Thu, 2006-08-31 at 18:29 +1000, Devraj Mukherjee wrote:
Hi Everyone,
I have got CentOS 64bit running on a Dell PowerEdge SC1850 with hardware raid 1. My LVM partions donot seem to honour chown commands for symbolic links. Is this normal? All other files and directories honour it.
<snip>
chown -h or chown --no-dereference
will change the ownership of the link source instead of the target (regardless of LVM)
EGAD! I should (re-)read a man page at least once each decade! :-(
For Linux and some others, true, but we need to be alert to
-h, --no-dereference affect each symbolic link instead of any referenced file (use- ful only on systems that can change the ownership of a symlink)
Tony Schreiner
I'm trying to imagine exactly how/when I would want to use this.
<snip sig stuff>
--- HTH