[Mono-bugs] [Bug 677255] Setting permissions doesn't work using Mono.Unix API

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Mar 7 11:59:56 EST 2011


https://bugzilla.novell.com/show_bug.cgi?id=677255

https://bugzilla.novell.com/show_bug.cgi?id=677255#c3


Jonathan Pryor <jpryor at novell.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #3 from Jonathan Pryor <jpryor at novell.com> 2011-03-07 16:59:55 UTC ---
As for the original bug, that is not a bug, that's Unix.

For example, within `csharp`:

    using (var o = new
UnixFileInfo("foo.txt").Create(FileAccessPermissions.AllPermissions)) {
    }

The `ls -l` output for foo.txt:

    $ ls -l foo.txt
    -rwxr-xr-x  1 jon  staff  0 Mar  7 11:45 foo.txt

I believe your "bug" is that 755 (the above) is not 777. HOWEVER:

    $ umask
    0022

If we set umask to 0:

    $ umask 0
    $  csharp -r:Mono.Posix.dll <<EOF
    using Mono.Unix;
    using (var o = new
UnixFileInfo("foo.txt").Create(FileAccessPermissions.AllPermissions)) {
    }
    EOF
    $ ls -l foo.txt 
    -rwxrwxrwx  1 jon  staff  0 Mar  7 11:57 foo.txt

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list