Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Mono.Unix.UnixDirectoryInfo("1").Create(FileAccessPermissions.AllPermissions); does not set the permission
but this code
UnixDirectoryInfo ud = new UnixDirectoryInfo("1");
ud.FileAccessPermissions = FileAccessPermissions.AllPermissions;
This is a result of the mkdir system call honoring umask, from what i can see. Should it?
For example, I ran your sample code, modified so it compiles, and the result was:
drwxrwxr-x 2 robwilkens robwilkens 4096 Jun 22 09:22 1
and i presume you were expecting
From the command prompt if i type 'umask' I get back 0002, which is why the other 'write' bit isn't set.
If as the user before running your sample code, from the command prompt, i type:
~/monotests$ umask 0000
~/monotests$ ls -ld 1
drwxrwxrwx 2 robwilkens robwilkens 4096 Jun 22 09:25 1
UnixDirectoryInfo.Create() should follow umask, as that's what Syscall.mkdir() does, and the documentation has a "see also" ref to the Syscall.mkdir() docs.
Docs updated in 43955e80.