Set the owner user and owner group of UnixFileSystemInfo.FullName.
- owner
- A Mono.Unix.UnixUserInfo containing information about the new owner user. If null, the owner user id is unchanged.
- group
- A Mono.Unix.UnixUserInfo containing information about the new owner group. If null, the owner group id is unchanged.
If this is called by the non-super user (usually the root user), then the FileSpecialAttributes.SetUserId and FileSpecialAttributes.SetGroupId bits are cleared.
Classes deriving from Mono.Unix.UnixFileSystemInfo can change this method to operate on a different file. This default version will follow symbolic links, changing the permissions of the symbolic link target instead of the symbolic link itself. UnixSymbolicLinkInfo.SetOwner changes permissions on the symbolic link itself.
This is (almost) equivalent to calling UnixFileSystemInfo.SetOwner(owner.UserId, group.GroupId).
Namespace: Mono.Unix
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0