bug-coreutils
[Top][All Lists]
Advanced

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

address@hidden: Re: preserve-gid (Re: coreutils-6.9.90 fail 1/84 (help-v


From: Elias Pipping
Subject: address@hidden: Re: preserve-gid (Re: coreutils-6.9.90 fail 1/84 (help-version) on i386-apple-darwin9.1.0)]
Date: Tue, 4 Dec 2007 08:52:13 +0100
User-agent: Mutt/1.5.17 (2007-11-01)

Forwarding this because I took it off-list by accident.

----- Forwarded message from Elias Pipping <address@hidden> -----

From: Elias Pipping <address@hidden>
Date: Tue, 4 Dec 2007 08:42:25 +0100
To: Bob Proulx <address@hidden>
Subject: Re: preserve-gid (Re: coreutils-6.9.90 fail 1/84 (help-version) on
        i386-apple-darwin9.1.0)

On Mon, Dec 03, 2007 at 09:00:32PM -0700, Bob Proulx wrote:
> 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? 

They start at 501. I don't know where they end, though.

> 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.
> 

501 is me.

> > + 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

  # mkdir preserve-gid
  # cd preserve-gid
  # chown +1000:+20 .
  # echo a0 > a0
  # ls -ld . a0
  drwxr-xr-x 2 1000 staff 102 2007-12-04 08:32 .
  -rw-r--r-- 1 root staff   3 2007-12-04 08:32 a0
  # chown +0:+0 a0
  # cp a0 b
  # ls -ld . a0 b
  drwxr-xr-x 2 1000 staff 136 2007-12-04 08:33 .
  -rw-r--r-- 1 root wheel   3 2007-12-04 08:32 a0
  -rw-r--r-- 1 root staff   3 2007-12-04 08:33 b

run as root, with PATH=${PWD}

> 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

It does.

  # mkdir preserve-gid2
  # cd preserve-gid2
  #   chown +1000:+0 .
  #   echo a0 > a0
  #   ls -ld . a0
  drwxr-xr-x 2 1000 wheel 102 2007-12-04 08:35 .
  -rw-r--r-- 1 root wheel   3 2007-12-04 08:35 a0
  #   chown +0:+0 a0
  #   cp a0 b
  #   ls -ld . a0 b
  drwxr-xr-x 2 1000 wheel 136 2007-12-04 08:35 .
  -rw-r--r-- 1 root wheel   3 2007-12-04 08:35 a0
  -rw-r--r-- 1 root wheel   3 2007-12-04 08:35 b
  #   test "x`stat -c '%u %g' b`" = 'x0 0' && echo passed || echo failed
  passed

again, run as root, with PATH=${PWD}

> > + 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?

I've just re-ran the test, absolutely positively as root, and it failed
again.

    + rm -rf /Users/pipping/coreutils-6.9.90/tests/cp/cu-preserve-gid.jiAjPyuxIY
    rm: cannot remove 
`/Users/pipping/coreutils-6.9.90/tests/cp/cu-preserve-gid.jiAjPyuxIY': 
Operation not permitted

/Users is a directory on the local harddrive.


-- Elias



----- End forwarded message -----

Attachment: pgpXIFxYGvkL8.pgp
Description: PGP signature


reply via email to

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