aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_bindfs.rb
diff options
context:
space:
mode:
authorAnton Ageev <antage@gmail.com>2013-07-22 02:06:00 +0400
committerAnton Ageev <antage@gmail.com>2013-07-22 02:06:00 +0400
commit5c1d9492bfd5290865fad000de0b63cbab243896 (patch)
tree513fe7f23d7cb750b57d2c346f271e7c9011635c /tests/test_bindfs.rb
parentcd92d03e5895c1ae93b051be7ba65fd1960a945c (diff)
downloadbindfs-5c1d9492bfd5290865fad000de0b63cbab243896.tar.gz
Alter chmod permissions when using --chmod-perms
Diffstat (limited to 'tests/test_bindfs.rb')
-rwxr-xr-xtests/test_bindfs.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb
index a78345b..26c7b20 100755
--- a/tests/test_bindfs.rb
+++ b/tests/test_bindfs.rb
@@ -258,6 +258,14 @@ testenv("--chmod-deny --chmod-allow-x") do
assert_exception(EPERM) { chmod(0700, 'mnt/dir') } # chmod on dir should not work
end
+testenv("--chmod-perms=g-w,o-rwx") do
+ touch('src/file')
+
+ chmod(0666, 'mnt/file')
+
+ assert { File.stat('src/file').mode & 0777 == 0640 }
+end
+
root_testenv("--map=nobody/root:@nogroup/@root") do
touch('src/file')
chown('nobody', 'nogroup', 'src/file')