coreutils
[Top][All Lists]
Advanced

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

Re: coreutils-8.12.178-df9cd on Solaris 10


From: Jim Meyering
Subject: Re: coreutils-8.12.178-df9cd on Solaris 10
Date: Fri, 02 Sep 2011 19:42:33 +0200

Bruno Haible wrote:
> Jim Meyering wrote:
>> You can probably find out by rerunning that test with e.g.,
>>
>>   SHELL=bash make check -C tests TESTS=cp/fail-perm VERBOSE=yes
>
> Find attached the test-suite.log that this produced.
>
> Here's what's going on:
>
> $ ls -ld DD
> drwx------+  3 haible   haible         3 Sep  2 17:23 DD
> $ ls -ld DD/D
> drwxrwxr-x+  2 haible   haible         2 Sep  2 17:23 DD/D
> $ ls -l DD/D
> total 0
> $ ls -la DD/D
> total 10
> drwxrwxr-x+  2 haible   haible         2 Sep  2 17:23 .
> drwx------+  3 haible   haible         3 Sep  2 17:23 ..
> $ /bin/rmdir DD/D
> rmdir: directory "DD/D": Search or write permission needed
> $ truss /bin/rmdir DD/D
> ...
> rmdir("DD/D")                                   Err#13 EACCES
> ...
>
> This is on an NFS volume.
>
>> A blind patch (without understanding, always risky),
>> this might solve the problem:
>>
>> diff --git a/tests/cp/fail-perm b/tests/cp/fail-perm
>> index 404c83e..4009c00 100755
>> --- a/tests/cp/fail-perm
>> +++ b/tests/cp/fail-perm
>> @@ -53,6 +53,6 @@ cp --target-directory=symlink F 2> out && fail=1
>>  sed 's/: The file access permissions.*/: Permission denied/'<out>o1;mv o1 
>> out
>>  compare out exp || fail=1
>>
>> -chmod 700 D
>> +chmod 700 D DD
>>
>>  Exit $fail
>
> No, it doesn't help.

Thanks for testing.

Here's the output:

  + my_uid=1088
  + case $my_uid in
  + return 1
  + chmod g-s .
  + mkdir D D/D
  + touch D/a
  + chmod 0 D/a
  + chmod u=rx,go=,-st D
  + cp -pR D DD
  ++ ls -ld DD
  ++ cut -b-10
  + mode=dr-x------
  + test dr-x------ = dr-x------
  + chmod 0 D
  + ln -s D/D symlink
  + touch F
  + cat
  + cp F symlink
  + sed 's/: The file access permissions.*/: Permission denied/'
  + mv o1 out
  + compare out exp
  + cmp out exp
  + cp --target-directory=symlink F
  + sed 's/: The file access permissions.*/: Permission denied/'
  + mv o1 out
  + compare out exp
  + cmp out exp
  + chmod 700 D
  + Exit 0
  + set +e
  + exit 0
  + exit 0
  + remove_tmp_
  + __st=0
  + cleanup_
  + :
  + cd /home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests
  + chmod -R u+rwx 
/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests/gt-fail-perm.gqYD
  + rm -rf 
/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests/gt-fail-perm.gqYD
  rm: cannot remove 
`/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests/gt-fail-perm.gqYD/DD/D':
 Permission denied
  + test 0 = 0
  + __st=1
  + exit 1

Note how at the end chmod -R u+rwx is applied to the containing directory.
That should have made every directory "rwx" by owner.

If you rerun the test with the following patch to init.sh,
maybe it'll show us something interesting.
If it doesn't, would you please add a "truss -o /tmp/chmod-log" prefix
on that same chown command?  Somehow, it appears not to be doing its job.

diff --git a/tests/init.sh b/tests/init.sh
index 12b3ca3..3bf5286 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -240,7 +240,7 @@ remove_tmp_ ()
   cleanup_
   # cd out of the directory we're about to remove
   cd "$initial_cwd_" || cd / || cd /tmp
-  chmod -R u+rwx "$test_dir_"
+  chmod --verbose -R u+rwx "$test_dir_"
   # If removal fails and exit status was to be 0, then change it to 1.
   rm -rf "$test_dir_" || { test $__st = 0 && __st=1; }
   exit $__st



reply via email to

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