[Mono-list] Changing owner, group and permissions

Srdan Dukic srdan.dukic at gmail.com
Mon Apr 12 23:53:45 EDT 2010


I have a mono program (runs as root) which (as a part of its functionality)
goes and creates a directory. This directory should have a non-root owner, a
non-root group and I would like to specify what permissions are on the

>From my understanding of the documentation, there are two ways of doing
this. The first through the use of the
System.IO.Directory.Create(DirectorySecurity) method and the second through
the use of the Mono.Unix.UnixDirectoryInfo.Create(FileAccessPermissions).

Is it possible to do this with either of these methods? If so, which method
is preferable? What are the advantages/disadvantages of each approach? i.e.
what is the 'best practice' way of doing this.

Thank you
Srđan Đukić
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20100413/fdc2b50b/attachment.html 

More information about the Mono-list mailing list