Bug #3301
closedcfuse: chmod not getting respected
0%
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
Updated by Sage Weil over 11 years ago
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)
Updated by Sam Lang over 11 years ago
- File client.admin.log client.admin.log added
Another issue:
chmod 400 a11
echo "foo" >> a11
< now fails correctly >
chmod 644 a11
ls la a11 1 root root 4 Oct 16 11:05 a11
-r-------
Updated by Sam Lang over 11 years ago
- File client.admin.log client.admin.log added
This log is of the client with only the following operations performed:
echo baz > baz
chmod 400 baz
chmod 644 baz
ls -la baz
Updated by Sam Lang over 11 years ago
- File mds.a.log mds.a.log added
- File client.admin.log client.admin.log added
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 1 root root 4 Oct 16 12:44 foo
-rw-r--r-
root@scout:/tmp/cmnt# chmod 400 foo
root@scout:/tmp/cmnt# ls la foo 1 root root 4 Oct 16 12:44 foo
-rw-r--r-
root@scout:/tmp/cmnt# echo foo >> foo
root@scout:/tmp/cmnt# ls la foo 1 root root 8 Oct 16 12:45 foo
-rw-r--r-
Note that the permissions were correct after the second chmod, but not after the third, and the append should have failed.
Updated by Sage Weil over 11 years ago
- Status changed from In Progress to Resolved