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
Isn't it should be "0777 & gbl_umask.mask" instead of "0700 & gbl_umask.mask "?
Yes, you are right. It is 0777 & gbl_umask.mask.
Cut and paste error. Sorry for this.
Regards Peter