issue with chown -h and symlinks on 10.3.9

I decided that I wanted to change my login account from a UID of 501 to one that matches the one used on my work network.
I created another account on my Mac, logged in as that user and su'ed to root, changed the UID of my login user "willf" using the NetInfo Manager utility then did:
find / -user 501 -print0 | xargs -0 chown -h willf

The problem that I see is that some files do not allow chown -h willf to work. For example in
/Applications/Adobe Reader 7.0/Adobe Reader 7.0.app/Contents/Frameworks/AdobeEula.framework/Versions:
$ ls -l
total 8
drwxrwxr-x 4 willf admin 136 17 Apr 2005 A
lrwxrwxrwx 1 501 admin 1 17 Apr 2005 Current -> A

chown -h willf Current
does nothing. Is this a bug in 10.3.9 or am I missing something?

Posted on Nov 2, 2005 4:54 PM

Reply
4 replies

Nov 2, 2005 5:31 PM in response to William Fiveash

Ownership and permissions of symlinks have no meaning and are somewhere between difficult and impossible to change from the command-line. Here's what the manpage for symlink (in section 7) says:

The owner and group of an existing symbolic link can be changed by means of the lchown(2) system call. The flags, access permissions, owner/group and modification time of an existing symbolic link can be changed by means of the lchflags(2), lchmod(2), lchown(2), and lutimes(2) system calls, respectively. Of these, only the flags are used by the system; the access permissions and ownership are ignored.

Nov 2, 2005 5:32 PM in response to William Fiveash

William
Is this a bug in 10.3.9


Yes, (it's a FreeBSD problem), and has been discussed often before here, although the posts have probably archived off. It is only symbolic links that are affected, as in your example.

Amazingly, this has been fixed in 10.4! Although you do need to be root, not just the owner, to do it (works OK with 'sudo').

Do you get any message? Without 'sudo', in 10.4 I get "Operation not permitted", even when I own the file.

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.

issue with chown -h and symlinks on 10.3.9

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