[Issue 3447] New: std.file uses unconventional file permissions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 29 04:03:56 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3447

           Summary: std.file uses unconventional file permissions
           Product: D
           Version: 2.035
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: bugzilla at kyllingen.net


--- Comment #0 from Lars T. Kyllingstad <bugzilla at kyllingen.net> 2009-10-29 04:03:55 PDT ---
The Posix version of std.file.write() creates files with the permission 0660. I
think most users will expect it to be the conventional 0666, which is the
default for the C fopen() function.

std.file.copy() also uses 0660, whereas the Posix cp command preserves the
permissions of the source file (as well as ownership and timestamps).

The security aspect should be taken care of by the process' umask, which in the
vast majority of cases will be 0022. (The resulting file will then have
permissions 0644.)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list