Bug #3301
closed
cfuse: chmod not getting respected
Added by Sam Lang over 11 years ago.
Updated over 11 years ago.
Description
echo "foo" > foo
chmod 400 foo
echo "bar" >> foo
Should fail with EPERM, but it succeeds.
Attached is a client log from the script.
Files
yeah, apparently fuse isn't doing the check itself... :/ we should enforce this in Client::_open(), methinks. after the if/else block, before if (result >= 0)
Another issue:
chmod 400 a11
echo "foo" >> a11
< now fails correctly >
chmod 644 a11
ls la a11
-r------- 1 root root 4 Oct 16 11:05 a11
This log is of the client with only the following operations performed:
echo baz > baz
chmod 400 baz
chmod 644 baz
ls -la baz
This time the logs are from doing the following:
root@scout:/tmp/cmnt# echo foo > foo
root@scout:/tmp/cmnt# chmod 400 foo
root@scout:/tmp/cmnt# chmod 644 foo
root@scout:/tmp/cmnt# ls la foo
-rw-r--r- 1 root root 4 Oct 16 12:44 foo
root@scout:/tmp/cmnt# chmod 400 foo
root@scout:/tmp/cmnt# ls la foo
-rw-r--r- 1 root root 4 Oct 16 12:44 foo
root@scout:/tmp/cmnt# echo foo >> foo
root@scout:/tmp/cmnt# ls la foo
-rw-r--r- 1 root root 8 Oct 16 12:45 foo
Note that the permissions were correct after the second chmod, but not after the third, and the append should have failed.
- Status changed from In Progress to Resolved
Also available in: Atom
PDF