[PVFS-developers] patch for chmod bug
Stuart White
stuart.white at conwaycorp.net
Mon Mar 1 17:12:12 EST 2004
We've seen some erroneous behavior with regard to chmod'ing directories on
PVFS. The following commands demonstrate what we've seen:
$ mkdir foo
$ chmod 000 foo
$ chmod 777 foo
chmod: changing permissions of `foo': Permission denied
After chmod'ing foo to 000, we cannot chmod it back to 777.
We've tracked this down to the fact that the manager is checking to make
sure that you have execute permissions on all parent directories, but in
this case, it's actually checking to see if you've got execute permissions
on the "foo" directory as well (which you never will if its permissions are
000).
I've attached a patch that fixes this behavior we're seeing. This patch
calls meta_access on a path that has been run through get_parent() and
therefore only contains the parent directories and not the actual "foo"
directory.
I'd appreciate your feedback regarding this patch. Do you think we've fixed
it the correct way?
>From looking at the code, it actually looks like this was how it was
intended to be written originally. The "temp" variable (which is the result
of calling get_parent) is never actually used anywhere in the md_chmod
function.
Stuart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chmod.patch
Type: application/octet-stream
Size: 474 bytes
Desc: not available
Url : http://www.beowulf-underground.org/pipermail/pvfs-developers/attachments/20040301/4533c7f4/chmod.obj
More information about the PVFS-developers
mailing list