From: Eric Blake <eblake@redhat.com>
To: Bob Proulx <bob@proulx.com>
Cc: 10311@debbugs.gnu.org, Jan Engelhardt <jengelh@medozas.de>
Subject: bug#10311: RFE: Give chmod a "-h" option as well
Date: Fri, 16 Dec 2011 12:04:33 -0700 [thread overview]
Message-ID: <4EEB9641.5090007@redhat.com> (raw)
In-Reply-To: <20111216183747.GB31096@hysteria.proulx.com>
[-- Attachment #1: Type: text/plain, Size: 1380 bytes --]
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 eblake@redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]
next prev parent reply other threads:[~2011-12-16 19:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-16 16:29 bug#10311: RFE: Give chmod a "-h" option as well Jan Engelhardt
2011-12-16 17:30 ` Bob Proulx
2011-12-16 17:42 ` Eric Blake
2011-12-16 18:37 ` Bob Proulx
2011-12-16 18:58 ` Paul Eggert
2011-12-16 19:04 ` Eric Blake [this message]
2011-12-16 20:16 ` Eric Blake
2011-12-16 17:59 ` Jan Engelhardt
2011-12-16 18:24 ` Bob Proulx
2011-12-16 18:06 ` Paul Eggert
2024-03-20 19:16 ` Pádraig Brady
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-coreutils
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EEB9641.5090007@redhat.com \
--to=eblake@redhat.com \
--cc=10311@debbugs.gnu.org \
--cc=bob@proulx.com \
--cc=jengelh@medozas.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).