On Tue, 03 Jul 2007 16:09:16 -0600 Karl Larsen wrote:<br>> <font size="4"><tt>Relax. What you think your tar changed is not changed. the permissions 
</tt><tt>you show are what I have. There is no way tar will change directories.
</tt></font><pre style="margin: 0em;"><font size="4">Karl</font><br><br></pre><br><br>It is not so.<br>See below. We work starting in /tmp. Try yourself.<br>[root@localhost tmp]# cd /tmp<br>[root@localhost tmp]# mkdir a<br>

[root@localhost tmp]# chmod 755 a<br>
[root@localhost tmp]# ll -d a<br>
drwxr-xr-x 2 root root 4096 2007-07-04 00:34 a<br>
[root@localhost tmp]# cd a<br>
[root@localhost a]# tar jcvf ../a.tar.bz2 ./<br>
./<br>[root@localhost a]# tar jtvf ../a.tar.bz2 <br>
drwxr-xr-x root/root         0 2007-07-04 00:34:27 ./<br>(more files following if a contained any files/directories but for the example it is the directory itself the problem)<br>[root@localhost a]# cd ..<br>
[root@localhost tmp]# mkdir b<br>
[root@localhost tmp]# chmod 777 b<br>
[root@localhost tmp]# ll -d b<br>
drwxrwxrwx 2 root root 4096 2007-07-04 00:35 b<br>
[root@localhost tmp]# cd b<br>
[root@localhost b]# tar jxvf /tmp/a.tar.bz2 <br>
./<br>
[root@localhost b]# ll -d .<br>
drwxr-xr-x 2 root root 4096 2007-07-04 00:34 .<br>
<br><br>So if you untar, AS ROOT, into a directory an archive that contains the root directory itself, you overwrite the permissions of the dir.<br>You (I actually ;-)<br>- should not use root<br>- verify archive  before extracting
<br>- create archive  without the leading ./ dir itself<br><br>