This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem creating files on network drives with cygwin 1.5.10-3 and tar


--- "Pierre A. Humblet" <pierre.humblet@ieee.org> wrote:
> On Wed, Jun 16, 2004 at 10:10:09AM -0700, Rick Rankin wrote:
> > 
> > OK, it *must* be something specific to the particular share I've been
> working
> > with. I just mapped some other drives from other servers, tried the same
> tar
> > command, and it worked just fine. The puzzling part is that on the problem
> > share, the *only* thing that fails is tar. I can create files with touch,
> cp,
> > vim, etc., etc. and I can remove them with rm, so it doesn't appear to be a
> > permission problem. It's also not a space problem, so I'm back to building
> the
> > debug versions...
> 
> Try writing a one line program that opens the file with flags 0x601.
> That's what tar does (from your strace)
> 0 = fhandler_disk_file::open (m:\test.tar, 0x601)
> 

OK, I gave that a try, and it behaves identically to tar, i.e., it works
everywhare but on the one share. Not surprisingly, the strace output for a run
where it fails on that share is almost identical to the strace output for when
tar fails on that share, at least for the relevant section. 

FWIW, I've attached the C source and resulting strace output.

Rick
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>

int main(int argc, char *argv[])
{
  if (argc != 2)
  {
    printf("Usage: %s file_name\n", argv[0]);
    exit(1);
  }

  int openFlags = O_CREAT | O_TRUNC | O_WRONLY;
  printf("open flags = 0x%04x\n", openFlags, 0777);

  int fd = open(argv[1], openFlags);
  if (fd == -1)
    printf("open failed: errno = %d, msg = '%s'\n", errno, strerror(errno));
  else
  {
    printf("open succeeded\n");
    close(fd);
  }
  exit(0);
}

Attachment: opentest.strace.bz2
Description: opentest.strace.bz2

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]