Hello,<br><br>I am a newbie to this mailing list, i have seen in some
mail discussions about a tar archive creation by forcibly setting the
UID/GID to a specific user (say root).<br><br>Te code mentioned goes like this:<br>
<pre>tar = tarfile.open("foo.tar.gz", "w:gz")<br>for filename in filenames:<br> tarinfo = tar.gettarinfo(filename)<br> if tarinfo.isreg():<br> fobj = open(filename)<br> else:<br> fobj = None<br>
<br> tarinfo.uid = 0<br> tarinfo.gid = 0<br> tar.addfile(tarinfo, fobj)<br>tar.close()<br></pre>But
this is not really working for me as when i am trying to un-tar or
un-compress contents to a new directory and contents still have diff
GID & UID in the long listing of directory.<br>
<br>Can somebody suggest an alternative or a working case if already changes are done here.<br><br>Thanks in advance.<br><br>Best regards,<br>Bheemesh