You are not logged in.

#1 2005-05-01 03:57:25

ralvy
Member
From: Santa Monica, California
Registered: 2004-12-06
Posts: 275

unzip problems

In the past, I have noticed that when unzipping a DOS-pkzip produced file,
found on my MO drive, to an MSDOS partition on my hard drive, timestamps
would all be changed to today/now on the target media if I did the
unzipping as user. But if I did the unzipping as root, all was okay, and
timestamps were preserved. In either case, the resulting files would be
accessible by the user (rw_rw_rw_). The target media (MSDOS partition on
the hard drive) is mounted with umask=000.

Somewhere down the line of unzip incarnations, the behaviour has changed.
Now, if I unzip the file found on the MO drive, targetting the same MSDOS
partition on the hard drive ...

1. if done as user, same problem: timestamps are changed to today/now.

2. if done as root, timestamps are preserved, but now permissions end up so
that the user can't write to these files (rw_r__r__).

I don't know any way around this other than to continue to unzip as root,
but follow that with recursively changing permissions to all subfolders and
files of my MSDOS partition (/mnt/dos).

Offline

#2 2005-05-01 12:13:27

Kern
Member
From: UK
Registered: 2005-02-09
Posts: 464

Re: unzip problems

unzip -X filename ?  (upper case X)

-X  restore UID/GID info
havent any DOS zips to test it with just now tho.
Seems to work with other zip archives i made.

Edit:

sad 

created a zip from a Win drive file, transferred back to Archdrive, and regardless of whether its unzipped as root or user, or -X is used on either, it still spits out the file with its original timestamps.
Will leave the post in, just in case it affect how Your files unzip. if not , just consign this to the Boll*cks bin or /dev/null
:?

Offline

#3 2005-05-01 16:12:03

ralvy
Member
From: Santa Monica, California
Registered: 2004-12-06
Posts: 275

Re: unzip problems

Thanks for the reply. I went and tried the -X switch, to no avail. When I do

unzip -X /mnt/mo/20050429 -d /mnt/dos

as user, I get the usual error next to the echo of each file being extracted:

(warning) cannot set timeschmod (file attributes) error: Operation not permitted

When I do the same thing as root, I don't get those errors, but, as before, permissions converted to rw_r__r__.

Offline

#4 2005-05-01 16:55:49

Kern
Member
From: UK
Registered: 2005-02-09
Posts: 464

Re: unzip problems

beats me!  looks like a permissions issue for sure.

maybe try this link for similar prob, scroll to near the bottom or search YOURUID

http://www.linuxjunior.org/yabbse/index … readid=427

Offline

#5 2005-05-01 17:36:28

ralvy
Member
From: Santa Monica, California
Registered: 2004-12-06
Posts: 275

Re: unzip problems

Kern wrote:

beats me!  looks like a permissions issue for sure.

maybe try this link for similar prob, scroll to near the bottom or search YOURUID

http://www.linuxjunior.org/yabbse/index … readid=427

That did it! Thanks, Kern. What I don't understand is why umask=000 wasn't suffiicient. Here's what was failing for the target MSDOS partition:

/dev/hda5 /mnt/dos msdos auto,umask=000 0 0

And here's what works, thanks to you:

/dev/hda5 /mnt/dos msdos auto,uid=1000,umask=000 0 0

Why wouldn't umask=000 be enough?

Offline

#6 2005-05-02 00:24:33

Kern
Member
From: UK
Registered: 2005-02-09
Posts: 464

Re: unzip problems

no idea dude, must be witchcraft ! lol
cant take credit for someone elses solution, but glad u got it sorted smile

K

Offline

Board footer

Powered by FluxBB