Symlinks in OS X (10.4.1)
Wesley W. Terpstra
wesley at terpstra.ca
Mon Oct 15 10:18:39 GMT 2007
On Oct 14, 2007, at 10:05 PM, dsp at gmx.org wrote:
>> Actually, this isn't quite true. osx has no lchmod, but if you set a
>> umask before creating the link, the permissions are set. So, as
>> opposed to ignoring the permissions, perhaps we should teach rsync
>> how to set them. I'll probably look at this as soon as I'm done
>> writing a patch for preserving the creation date.
>
> I know about the missing lchmod in OS X, but I don't really see a
> need for
> it. Why can't a symlink just have a default permission of 0777? In
> case the
> symlink gets dereferenced the target's permissions have to be
> considered
> anyway. Of course it is cleaner to have them set properly, but if
> they are
> just ignored it won't hurt either.
I believe in osx the symlink permissions have meaning (as opposed to
linux). Eg:
-rwxrwxrwx bar
----r--r-- foo -> bar
In linux, 'cat foo' will work, in osx, it will fail. So, this meta-
data has meaning, and to just replace it with 0777 will not give you
a functionally equal copy.
More information about the rsync
mailing list