Unable to change ACL-permissions for symbolic links

the chmod-manual page states about the -h option: If the file is a symbolic link, change the mode of the link itself rather than the file that the link points to.

But somehow this doesn't seem to have an effect. it always manipulates the original file instead of the symbolic link although this should be the default behaviour anyway. I tried with several different links and checked with 'ls -le'. It doesn't matter whether I try to add permissions or get rid of all of them with 'chmod -h -N ./linkfile' or 'chmod -N -h ./linkfile'.

Any help would be appreciated although I guess I could live with all the symbolic links in my home directory having the "group:everyone deny delete" restriction on them.. :S

MacBook Pro, Mac OS X (10.5.2)

Posted on Mar 13, 2008 9:49 AM

Reply
16 replies

Mar 15, 2008 6:46 AM in response to biovizier

the lchmod is converted in the following library to a [setattrlist(2)|http://developer.apple.com/documentation/Darwin/Reference/ManPa ges/man2/setattrlist.2.html] system call.

from Libc-498:
[emulated/lchmod.c|http://www.opensource.apple.com/darwinsource/10.5.2/Libc-498/ emulated/lchmod.c]


a.bitmapcount = ATTRBIT_MAPCOUNT;
a.commonattr = ATTRCMNACCESSMASK;
m = mode;
return setattrlist(path, &a, &m, sizeof(int), FSOPT_NOFOLLOW);


Message was edited by: Nils C. Anderson

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Unable to change ACL-permissions for symbolic links

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.