Menu

#87 7za ignores umask on directory creation

open
my space
None
5
2009-04-30
2009-04-30
No

7za does always create directories with 700. The reason is, that gbl_umask is not used for mkdir in FileDir.cpp

Here is a patch for p7zip_4.65:

diff FileDir.cpp FileDir_fix.cpp

569c569
< if (mkdir( name, 0700 ) == 0) bret = true;
---
> if (mkdir( name, 0700 & gbl_umask.mask ) == 0) bret = true;

You should also consider to offer a switch that disables every chmod. Some filesystems, like GPFS on AIX, do destroy all extended ACLs with a chmod.

Regards
Peter

Discussion

  • my space

    my space - 2009-04-30
    • assigned_to: nobody --> myspace
     
  • JackieKu

    JackieKu - 2009-08-18

    Isn't it should be "0777 & gbl_umask.mask" instead of "0700 & gbl_umask.mask "?

     
  • Peter Heuchert

    Peter Heuchert - 2009-08-18

    Yes, you are right. It is 0777 & gbl_umask.mask.
    Cut and paste error. Sorry for this.

    Regards Peter

     

Log in to post a comment.