Re: Symlinks in OS X (10.4.1)
On Mon, 2007-10-15 at 22:21 -0400, Matt McCutchen wrote: On 10/15/07, Wayne Davison [EMAIL PROTECTED] wrote: Is there a system call that allows their permissions to be changed after they've been created? (Since lchmod is lacking.) I don't think so, but as Wesley hinted, one can effectively change a symlink's permissions by deleting it, setting the umask appropriately, and recreating it. I think this behavior is useful enough to be provided by a distributed patch. It does break hard links; are there any other caveats? Deleting the symlink, means the link is not present for an undetermined period, doesn't seem a really clean way to just change permissions. Simo. -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Symlinks in OS X (10.4.1)
On Oct 14, 2007, at 10:05 PM, [EMAIL PROTECTED] 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. -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Symlinks in OS X (10.4.1)
On Mon, Oct 15, 2007 at 12:18:39PM +0200, Wesley W. Terpstra wrote: I believe in osx the symlink permissions have meaning (as opposed to linux). Is there a system call that allows their permissions to be changed after they've been created? (Since lchmod is lacking.) ..wayne.. -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Symlinks in OS X (10.4.1)
On 10/15/07, Wayne Davison [EMAIL PROTECTED] wrote: Is there a system call that allows their permissions to be changed after they've been created? (Since lchmod is lacking.) I don't think so, but as Wesley hinted, one can effectively change a symlink's permissions by deleting it, setting the umask appropriately, and recreating it. I think this behavior is useful enough to be provided by a distributed patch. It does break hard links; are there any other caveats? Matt -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Symlinks in OS X (10.4.1)
On Oct 15, 2007, at 8:19 PM, Wayne Davison wrote: On Mon, Oct 15, 2007 at 12:18:39PM +0200, Wesley W. Terpstra wrote: I believe in osx the symlink permissions have meaning (as opposed to linux). Is there a system call that allows their permissions to be changed after they've been created? (Since lchmod is lacking.) I was about to say no, but then I saw this: setattrlist + ATTR_CMN_ACCESSMASK I'll check tomorrow if one can write lchmod for osx using this. -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Symlinks in OS X (10.4.1)
On Oct 13, 2007, at 8:56 PM, [EMAIL PROTECTED] wrote: since OS X has no support for symlink permissions 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. -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Symlinks in OS X (10.4.1)
On Sat, Oct 13, 2007 at 08:56:23PM +0200, [EMAIL PROTECTED] wrote: is there a way to ignore the permissions for symlinks but compare the permissions for regular files and change them accordingly? That should be the default for any system that doesn't have lchmod(). ..wayne.. -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Symlinks in OS X (10.4.1)
On Sat, Oct 13, 2007 at 08:56:23PM +0200, [EMAIL PROTECTED] wrote: is there a way to ignore the permissions for symlinks but compare the permissions for regular files and change them accordingly? On Sun, Oct 14, 2007 at 04:57:31PM -0700, Wayne Davison wrote: That should be the default for any system that doesn't have lchmod(). Aha, I see the problem. Rsync doesn't try to set the permissions, but it does list the permissions as differing in the itemized output. I'll fix that. ..wayne.. -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Symlinks in OS X (10.4.1)
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. Thank you for the reply! 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. Regards, Mario -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html