1 Reply Latest reply on Mar 1, 2011 1:08 AM by Gerardo Bartoccini

    tar: Access/modification time set failed on: TEST_DIR <Permission denied>

    Gerardo Bartoccini


      I'm getting crazy with the following issue:


      I'm running "tar xf" into an NSH script (type 1) that I have been deeply testing during last weeks (and used to work fine!), and I'm getting the following error:


      server% tar xf FILE.tar

      tar: Access/modification time set failed on: TEST_DIR <Permission denied>


      The script used to work fine, and nothing changed since then (yeah, Audits would help here, but it's a dev env :-) ). Target server is a Windows box. I am mapped as Administrator:


      02/25/11 17:30:23.672 3936 BladeLogicRSCD@SERVER->Administrator@SERVER:PrivilegeMapped (BLAdmins:BLAdmin): tar: tar -D //server/c/temp xf FILE.tar


      I can touch a file into that directory, I can remove the TEST_DIR directory (which is created by the tar command), and the files contained in the tarball are actually extracted. Apparently it's the attributes change that fails.


      I have seen that there is a flag "m" for "not preserve file modification  times", but it doesn't help.


      Summarizing, I can no longer run "tar xf FILE.tar" through NSH.


      Any hints?

        • 1. tar: Access/modification time set failed on: TEST_DIR <Permission denied>
          Gerardo Bartoccini

          Ok, I seem to have narrowed down the issue, which I believe it's potentially a very bad one.


          When tar'ring or un-tar'ring a directory on Windows through NSH, the tar operation ends with an error.


          Here's how to reproduce the issue:


          1) via NSH, cd to a Windows server

          2) create a tar file, which INCLUDES A DIRECTORY.

          Example: you have a directory called Temp which contains three .iss files.

          Go one level above and type:

          tar cf Temp.tar Temp/*.iss

          (find this file attached)

          3) mv the tar file wherever you want, on the same server

          4) try and un-tar the file.


          You will get two errors. See below:


          IBMC-3B1QJ4J% cd //win03-db

          win03-db% cd /C/Temp

          win03-db% ls

          RSCD63-W32.EXE                          msxml3.msi

          RSCD800-622-W32.exe                     stage

          WindowsAgent-trunk-20060215-292.exe     uninstall32.iss

          WindowsServer2003-KB867460-x86-ENU.EXE  upgrade32.iss install32.iss

          win03-db% cd ..

          win03-db% tar cf Temp.tar Temp/*.iss

          tar: File changed size during read Temp/install32.iss

          tar: File changed size during read Temp/uninstall32.iss

          tar: File changed size during read Temp/upgrade32.iss

          win03-db% echo $?


          win03-db% tar tvf Temp.tar

          -rw-rw-rw-  1 0        0             1281 Feb 28 13:07 Temp/install32.iss

          -rw-rw-rw-  1 0        0              534 Feb 28 13:03 Temp/uninstall32.iss

          -rw-rw-rw-  1 0        0              556 Feb 28 13:03 Temp/upgrade32.iss

          win03-db% mv Temp.tar /C/tmp

          win03-db% cd /C/tmp

          win03-db% tar xf Temp.tar

          tar: Access/modification time set failed on: Temp <Permission denied>

          win03-db% echo $?




          Actually both tar operations succeed (tar file is created, tar file is extracted), but both operations return an error.


          Workaround: not checking if the operation is successful.

          Anyway, I believe this is a bug.


          Anybody experienced this?