title: python tarinfo permission bits
body: <p>I am using <code>tarfile</code> module to check the permission of the packages in my tar.gz file.
  My problem are two folds.  </p>
  
  <p>Permission bits value are different from the value got from <code>ls -l</code> command.  From <code>list</code> command, value is <code>755</code>. But I get <code>488</code> in my program. I use the below command function - </p>
  
  <hr>
  
  <pre><code>def checkAndExtratZipFile (value,packageElementInfoList):
      try:
          tar = tarfile.open(value,"r:gz")
          for tarinfo in tar:
              global elementType
  
              # Populate all information about the element
              name  = tarinfo.name
              size  = tarinfo.size
              perm  = tarinfo.mode
              if tarinfo.isdir():
                  eleType = elementType.Directory
              elif tarinfo.issym():
                  eleType = elementType.SymbolicLink
              else:
                  eleType = elementType.File
  
              # Populate into list        
              packageElementInfoList.append(packageElementInfo(name,eleType,perm,size))                   
  
          tar.close()
      except: 
          print "Verification of package %s failed.\n Reason : Not able to read contents in the tar package." % value
          sys.exit(1)
  </code></pre>
  
  <hr>
  
  <p>My system (working on SUSE Linux) will have packages to be verified which are created by SUSE/AIX and HP platform. So I need to verify packages built on AIX/HP/Linux platform on Linux Server. 
  The permission bits of AIX/HP package on Linux is very weird.A <code>755</code> permission bit is given as <code>33256</code>.</p>
  
  <p>Any help is appreciated.</p>