Menu

How does p7zip store the permission of files

Help
Fei Xue
2020-09-29
2020-09-29
  • Fei Xue

    Fei Xue - 2020-09-29

    Hi
    I am new to p7zip. I compress something with 7za and dump the archive and found the Attribute is an uint32_t. I search the codes and found statement like this: st_mode = Attribute << 16. I don't understand what the attribute means and what the permission (like 0755 or 0644) are converted into this field ?
    Thank you.

     
  • Igor Pavlov

    Igor Pavlov - 2020-09-29

    low 16 bits for windows attributes
    high 16 bits for posix attributes.
    So one 32-bit value can store both versions of attributes.

     

Log in to post a comment.