Symlinks and ownership
| From: | Christoph Boget | Date: | Thu, 23 Apr 2009 17:21:11 +0000 |
| Subject: | Symlinks and ownership | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-291884@lists.php.net to get a copy of this message | ||
Is there a reason why you can't programatically set ownership of a
symbolic ink? The following code
if( symlink( TARGET, LINK ))
{
echo 'Successfully created ' . LINK . "\n";
if( @chown( LINK, NEW_UID ))
{
echo 'Successfully changed ownership for ' . LINK . "\n";
if( @chgrp( LINK, NEW_UID ))
{
echo 'Successfully changed group for ' . LINK . "\n";
}
}
}
echos out:
Successfully created XXX
Successfully changed ownership for XXX
Successfully changed group for XXX
yet when I go take a look at it in the directory, the group for the
link has not been changed to what I set it to. Is that not something
you can do for symbolic links programatically?
thnx,
Christoph