bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

preserve-gid (Re: coreutils-6.9.90 fail 1/84 (help-version) on i386-appl


From: Bob Proulx
Subject: preserve-gid (Re: coreutils-6.9.90 fail 1/84 (help-version) on i386-apple-darwin9.1.0)
Date: Mon, 3 Dec 2007 21:00:32 -0700
User-agent: Mutt/1.5.13 (2006-08-11)

Elias Pipping wrote:
> FAIL: preserve-gid.log (exit: 1)

Here is the failure, the "good parts" version:

> + nameless_uid=1000
> + nameless_gid1=1000
> + nameless_gid2=1001

What range is the normal user range for your system?  Because it looks
like your system has no non-root users but I assume they are simply in
a different id range such as down in the 100 or 500 numbers.

> + chown +1000 .
> + echo a0
> + chown +0:+0 a0
> + cp a0 b
> ++ stat -c '%u %g' b
> + s='0 20'
> + test 'x0 20' '!=' 'x0 0'
> + echo './preserve-gid: cp a0 b: 0 0 != 0 20'
> ./preserve-gid: cp a0 b: 0 0 != 0 20

Can you try this?  This is a slightly modified form of the above.  It
is explicitly setting the group of the test directory to group 20
whereas in the above I think it is happening arbitrarily.

  mkdir preserve-gid
  cd preserve-gid
  chown +1000:+20 .
  echo a0 > a0
  ls -ld . a0
  chown +0:+0 a0
  cp a0 b
  ls -ld . a0 b

I don't see where in the test it is setting the group of the
directory.  A BSD based system I expect would create the new file with
the same group as the parent directory.  When b is copied I don't see
where the group would be getting set explicitly and so it will inherit
the directory group.  It looks like the group is inheriting your users
group of 20.

Then try again with this modification.  If this passes then we can fix
the test.

  chown +1000:+0 .
  echo a0 > a0
  ls -ld . a0
  chown +0:+0 a0
  cp a0 b
  ls -ld . a0 b
  test "x`stat -c '%u %g' b`" = 'x0 0' && echo passed || echo failed

> + chmod -R u+rwx 
> /Users/pipping/coreutils-6.9.90/tests/cp/cu-preserve-gid.xoMcxRWTmq
> + rm -rf /Users/pipping/coreutils-6.9.90/tests/cp/cu-preserve-gid.xoMcxRWTmq
> rm: cannot remove 
> `/Users/pipping/coreutils-6.9.90/tests/cp/cu-preserve-gid.xoMcxRWTmq': 
> Operation not permitted

This does not seem like it should have failed when run by root.
What type of a filesystem is /Users ?  Is that local or networked?

Thanks
Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]