[11916] in Athena Bugs
sun4 7.6R: find
daemon@ATHENA.MIT.EDU (jweiss@MIT.EDU)
Fri Apr 1 18:48:25 1994
From: jweiss@MIT.EDU
To: bugs@MIT.EDU
Cc: jweiss@MIT.EDU
Date: Fri, 01 Apr 94 18:48:18 EST
System name: the-other-woman
Type and version: SPARC/Classic 7.6R (1 update(s) to same version)
Display type: cgthree
What were you trying to do?
use find to give my self permissions on a directory that I couldn't read.
the-other-woman:/tmp/foo: ls -la
total 6
drwx------ 3 jweiss 101 512 Apr 1 18:38 .
drwxrwxrwt 9 sys sys 1024 Apr 1 18:37 ..
d--------- 2 jweiss 101 512 Apr 1 18:38 foo
(this is in /tmp so AFS doesn't apply)
What's wrong:
the-other-woman:/tmp/foo: find . -type d -exec chmod u+rwx {} \;
find: cannot read dir ./foo: Permission denied
the-other-woman:/tmp/foo: ls -la
total 6
drwx------ 3 jweiss 101 512 Apr 1 18:38 .
drwxrwxrwt 9 sys sys 1024 Apr 1 18:37 ..
d--------- 2 jweiss 101 512 Apr 1 18:38 foo
the-other-woman:/tmp/foo: chmod u+rwx ./foo
the-other-woman:/tmp/foo: ls -la
total 6
drwx------ 3 jweiss 101 512 Apr 1 18:38 .
drwxrwxrwt 9 sys sys 1024 Apr 1 18:37 ..
drwx------ 2 jweiss 101 512 Apr 1 18:38 foo
the-other-woman:/tmp/foo: find . -type d -exec chmod u+rwx {} \;
the-other-woman:/tmp/foo:
What should have happened:
find should have done the exec before trying trying to read it.
I did not invoke find with the -depth option.
Please describe any relevant documentation references:
man find