>On 6/7/06, Rosyna <email@hidden> wrote:
>>Where exactly do symbolic links created with symlink() get their
>>permissions? The lstat man page says it is from the parent folder,
>>yet when actually creating a symlink in practice, they have neither
>>the permissions of the target nor the parent directory. The
>>symlink(7) man page mentions lchmod() but that function doesn't seem
>>to be a part of OS X.
>
>The permissions seem to be the umask permissions for newly-created
>directories.
Which seems to go against all documentation on symlinks included with Tiger.
>>How can we ensure that relative symbolic links we create are able to
>>be followed?
>
>It shouldn't matter. It's the permissions on the target, not the
>permissions on the link, that limit what you can do with the target.
But it does. If the user cannot read the symlink (as is our case)
then they cannot follow it.
I'm using 10.3 here, which might make the difference, but the
following, run from the terminal, works exactly as expected:
$ umask 0777
$ ln -s filemac.txt softlink.txt
$ ls -l *.txt
-rwxrw-rw- 2 markwagn staff 274 14 Nov 2005 filemac.txt*
l--------- 1 markwagn staff 11 7 Jun 11:10 softlink.txt@ -> filemac.txt
$ vi softlink.txt
...I'm able to edit the file just fine. Double-clicking softlink.txt
in Finder brings up filemac.txt in SimpleText, as expected.
--
Mark Wagner
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden