[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#10311: RFE: Give chmod a "-h" option as well
From: |
Eric Blake |
Subject: |
bug#10311: RFE: Give chmod a "-h" option as well |
Date: |
Fri, 16 Dec 2011 12:04:33 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 |
On 12/16/2011 11:37 AM, Bob Proulx wrote:
> Eric Blake wrote:
>> Bob Proulx wrote:
>>> * The mode bits of a symlink are not used. The original Unix authors
>>> ignored them and did not provide any way to change them.
>>
>> That's true for Linux, but false for BSD (where the mode bits of a
>> symlink can allow restriction on dereferencing through the symlink).
>
> What?! I was not aware of this. I have been too SysV centric for too
> many years. And I do not have access to a BSD system in which to
> learn about it.
>
> It would be informative to myself and I expect others if you could
> post an example of the behavior from a BSD system showing the
> restriction through a symlink's permissions.
Right now, I only had easy access to 64-bit FreeBSD 8.2-RELEASE, and
there, the system call lchmod(2) exists, but 'man 7 symlink' states that
access permissions are ignored.
But I still remember reading about permissions affecting symlinks on at
least one BSD variant (I'm still trying to find where I remember that
from); something like 'w' permissions were required for readlink(2) to
succeed, and 'x' permissions required for open(2) and friends to
successfully follow the symlink. I'll post back if I can find more
evidence.
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature