Linux MS DOS discussions
 help / color / mirror / Atom feed
* Strange unzip problems
@ 2002-05-30 19:44 Anthony M. Richardson
  2002-06-04  9:36 ` Bart Oldeman
  2002-06-04 11:07 ` Witold Filipczyk
  0 siblings, 2 replies; 7+ messages in thread
From: Anthony M. Richardson @ 2002-05-30 19:44 UTC (permalink / raw)
  To: linux-msdos

I'm using dosemu under Linux with FreeDOS beta 8.  I'm also using a Linux 
directory as my C drive. Everything seemed to be working great until I tried 
to install DJGPP.  When I use unzip from within dosemu on a recursive zip 
archive, there are several errors.  When unzip is extracting files from an 
archive and creating directories (from within DOSEMU), the directories are 
created without execute permission (in the linux file system).  The unzip 
program then can't extract files to these directories.

I asked for help on the DJGPP list, but people there seemed to think that I 
might have a DOSEMU configuration setting messed up.  Do I?  Does anyone have 
any suggestions?  Unfortunately, I can't just unzip on the Linux side because 
long file names are handled differently by Linux and DOS.

Thanks,
Tony Richardson


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Strange unzip problems
  2002-05-30 19:44 Strange unzip problems Anthony M. Richardson
@ 2002-06-04  9:36 ` Bart Oldeman
  2002-06-04 13:20   ` Anthony M. Richardson
  2002-06-04 11:07 ` Witold Filipczyk
  1 sibling, 1 reply; 7+ messages in thread
From: Bart Oldeman @ 2002-06-04  9:36 UTC (permalink / raw)
  To: Anthony M. Richardson; +Cc: linux-msdos

On Thu, 30 May 2002, Anthony M. Richardson wrote:

> I'm using dosemu under Linux with FreeDOS beta 8.  I'm also using a Linux 
> directory as my C drive. Everything seemed to be working great until I tried 
> to install DJGPP.  When I use unzip from within dosemu on a recursive zip 
> archive, there are several errors.  When unzip is extracting files from an 
> archive and creating directories (from within DOSEMU), the directories are 
> created without execute permission (in the linux file system).  The unzip 
> program then can't extract files to these directories.

Ah, that narrows it down from your post on comp.os.msdos.djgpp :)

I suspect that unzip does something like this:

mkdir dir
attrib +a dir -- this removes the (user) x bit from dir

You'll need to either hack unzip or hack DOSEMU src/dosext/mfs/mfs.c to
avoid this. I'm away and cannot make a patch easily, but anyway, it is
impossible to avoid it using dosemu.conf adjustments.

Bart


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Strange unzip problems
  2002-05-30 19:44 Strange unzip problems Anthony M. Richardson
  2002-06-04  9:36 ` Bart Oldeman
@ 2002-06-04 11:07 ` Witold Filipczyk
  2002-06-04 12:44   ` Bart Oldeman
  1 sibling, 1 reply; 7+ messages in thread
From: Witold Filipczyk @ 2002-06-04 11:07 UTC (permalink / raw)
  To: Anthony M. Richardson; +Cc: linux-msdos

On Thu, May 30, 2002 at 02:44:45PM -0500, Anthony M. Richardson wrote:
> I'm using dosemu under Linux with FreeDOS beta 8.  I'm also using a Linux 
> directory as my C drive. Everything seemed to be working great until I tried 
> to install DJGPP.  When I use unzip from within dosemu on a recursive zip 
> archive, there are several errors.  When unzip is extracting files from an 
> archive and creating directories (from within DOSEMU), the directories are 
> created without execute permission (in the linux file system).  The unzip 
> program then can't extract files to these directories.
> 
> I asked for help on the DJGPP list, but people there seemed to think that I 
> might have a DOSEMU configuration setting messed up.  Do I?  Does anyone have 
> any suggestions?  Unfortunately, I can't just unzip on the Linux side because 
> long file names are handled differently by Linux and DOS.
> 
> Thanks,
> Tony Richardson

What umask says?
On my machine:
# umask
022

and
C:\> zip -r freedos.zip freedos
C:\> unzip -d temp freedos.zip
works

dosemu started from root account,
Freedos Beta 7 Ripcord
dosemu-1.0.2.1

-- 
Witold Filipczyk <witekfl@poczta.onet.pl>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Strange unzip problems
  2002-06-04 11:07 ` Witold Filipczyk
@ 2002-06-04 12:44   ` Bart Oldeman
  2002-06-04 15:59     ` Witold Filipczyk
  2002-06-06 14:12     ` Anthony M. Richardson
  0 siblings, 2 replies; 7+ messages in thread
From: Bart Oldeman @ 2002-06-04 12:44 UTC (permalink / raw)
  To: Witold Filipczyk; +Cc: Anthony M. Richardson, linux-msdos

On Tue, 4 Jun 2002, Witold Filipczyk wrote:

> C:\> zip -r freedos.zip freedos
> C:\> unzip -d temp freedos.zip
> works
> 
> dosemu started from root account,
> Freedos Beta 7 Ripcord
> dosemu-1.0.2.1

on a FAT partition? That makes a difference because you cannot turn off
directory x bits on (Linux mounted and lredir'ed) FAT partitions.

If C:\ corresponds to an ext2 instead of a FAT partition then things 
are different of course.

Bart


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Strange unzip problems
  2002-06-04  9:36 ` Bart Oldeman
@ 2002-06-04 13:20   ` Anthony M. Richardson
  0 siblings, 0 replies; 7+ messages in thread
From: Anthony M. Richardson @ 2002-06-04 13:20 UTC (permalink / raw)
  To: Bart Oldeman; +Cc: linux-msdos

On Tuesday 04 June 2002 04:36 am, Bart Oldeman wrote:
> On Thu, 30 May 2002, Anthony M. Richardson wrote:
> > I'm using dosemu under Linux with FreeDOS beta 8.  I'm also using a Linux
> > directory as my C drive. Everything seemed to be working great until I
> > tried to install DJGPP.  When I use unzip from within dosemu on a
> > recursive zip archive, there are several errors.  When unzip is
> > extracting files from an archive and creating directories (from within
> > DOSEMU), the directories are created without execute permission (in the
> > linux file system).  The unzip program then can't extract files to these
> > directories.
>
> Ah, that narrows it down from your post on comp.os.msdos.djgpp :)
>
> I suspect that unzip does something like this:
>
> mkdir dir
> attrib +a dir -- this removes the (user) x bit from dir
>
> You'll need to either hack unzip or hack DOSEMU src/dosext/mfs/mfs.c to
> avoid this. I'm away and cannot make a patch easily, but anyway, it is
> impossible to avoid it using dosemu.conf adjustments.
>
> Bart

Thanks for the information.  I think you are right about what is happening.  
Shouldn't DOSEMU handle directories differently than regular files in this 
case?

For what its worth, I have to use "attrib +s +a dir" and not just
"attrib +a dir" (from the command line) to remove the x bit from the 
directory.

Tony


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Strange unzip problems
  2002-06-04 12:44   ` Bart Oldeman
@ 2002-06-04 15:59     ` Witold Filipczyk
  2002-06-06 14:12     ` Anthony M. Richardson
  1 sibling, 0 replies; 7+ messages in thread
From: Witold Filipczyk @ 2002-06-04 15:59 UTC (permalink / raw)
  To: linux-msdos

On Tue, Jun 04, 2002 at 01:44:08PM +0100, Bart Oldeman wrote:
> On Tue, 4 Jun 2002, Witold Filipczyk wrote:
> 
> > C:\> zip -r freedos.zip freedos
> > C:\> unzip -d temp freedos.zip
> > works
> > 
> > dosemu started from root account,
> > Freedos Beta 7 Ripcord
> > dosemu-1.0.2.1
> 
> on a FAT partition? That makes a difference because you cannot turn off
> directory x bits on (Linux mounted and lredir'ed) FAT partitions.
> 
> If C:\ corresponds to an ext2 instead of a FAT partition then things 
> are different of course.

On ext2.

-- 
Witold Filipczyk <witekfl@poczta.onet.pl>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Strange unzip problems
  2002-06-04 12:44   ` Bart Oldeman
  2002-06-04 15:59     ` Witold Filipczyk
@ 2002-06-06 14:12     ` Anthony M. Richardson
  1 sibling, 0 replies; 7+ messages in thread
From: Anthony M. Richardson @ 2002-06-06 14:12 UTC (permalink / raw)
  To: Bart Oldeman, Witold Filipczyk; +Cc: linux-msdos

On Tuesday 04 June 2002 07:44 am, Bart Oldeman wrote:
> On Tue, 4 Jun 2002, Witold Filipczyk wrote:
> > C:\> zip -r freedos.zip freedos
> > C:\> unzip -d temp freedos.zip
> > works
> >
> > dosemu started from root account,
> > Freedos Beta 7 Ripcord
> > dosemu-1.0.2.1
>
> on a FAT partition? That makes a difference because you cannot turn off
> directory x bits on (Linux mounted and lredir'ed) FAT partitions.
>
> If C:\ corresponds to an ext2 instead of a FAT partition then things
> are different of course.

The example above will not work for me on ext2.  (Actually I'm using ext3, 
would that make a difference?) In the example above the temp directory would 
be created (with execute permission).  The freedos directory would be created 
also, but without execute permission so no files could be extracted to it.

I've found that I can extract some zip archives (that have subdirectories), 
but not others.  I played around with zip a bit and found that I can unzip 
files that are created with -R, but not with -r.  Unfortunately the archives 
I'm trying to extract were apparently created with -r.  I'm using the 
info-zip unzip that comes with freedos.  (djgpp provides one too, but I think 
it is the info-zip one - it doesn't work either.)

I've found that I can get around the problem by creating an MSDOS partition 
image and using the loopback device to mount the image under my linux 
filesystem and using the mount point as my cdrive.  Not nearly as nice as 
just keeping everything under my ext3 filesystem but workable.

I think there is a problem with mapping of dos attribs to ext3 perms in 
dosemu.  Why should "attrib +s +h dir" make a directroy inaccessible?
It doesn't make it inaccessible under MSDOS on real hardware does it?

Thanks,
Tony




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-06-06 14:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-30 19:44 Strange unzip problems Anthony M. Richardson
2002-06-04  9:36 ` Bart Oldeman
2002-06-04 13:20   ` Anthony M. Richardson
2002-06-04 11:07 ` Witold Filipczyk
2002-06-04 12:44   ` Bart Oldeman
2002-06-04 15:59     ` Witold Filipczyk
2002-06-06 14:12     ` Anthony M. Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox