Mono Class Library: Mono.Unix.UnixFileSystemInfo Overview | MembersMono.Unix.UnixFileSystemInfo.SetOwner Method |
Set the owner user ID and owner group ID of UnixFileSystemInfo.FullName. [Edit]
|
The user owner is looked up in the local password database and the resulting UnixUserInfo.UserId and UnixUserInfo.GroupId are used as the new owner user id and owner group id for UnixFileSystemInfo.FullName.
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.
[Edit]
Namespace: Mono.Unix
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0