mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2025-01-05 05:52:11 +00:00
Resolves issue #154
Installed and tested fix for file permissions/cache issue git-svn-id: http://s3fs.googlecode.com/svn/trunk@311 df820570-a93a-0410-bd06-b72b767a4274
This commit is contained in:
parent
6f7e180133
commit
c8d5b35f8f
@ -1,7 +1,7 @@
|
|||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_PREREQ(2.59)
|
AC_PREREQ(2.59)
|
||||||
AC_INIT(s3fs, 1.37)
|
AC_INIT(s3fs, 1.38)
|
||||||
|
|
||||||
|
|
||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
|
@ -2974,6 +2974,9 @@ static int s3fs_chmod(const char *path, mode_t mode) {
|
|||||||
meta["x-amz-meta-mode"] = str(mode);
|
meta["x-amz-meta-mode"] = str(mode);
|
||||||
meta["x-amz-copy-source"] = urlEncode("/" + bucket + path);
|
meta["x-amz-copy-source"] = urlEncode("/" + bucket + path);
|
||||||
meta["x-amz-metadata-directive"] = "REPLACE";
|
meta["x-amz-metadata-directive"] = "REPLACE";
|
||||||
|
|
||||||
|
delete_stat_cache_entry(path);
|
||||||
|
|
||||||
return put_headers(path, meta);
|
return put_headers(path, meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2999,6 +3002,9 @@ static int s3fs_chown(const char *path, uid_t uid, gid_t gid) {
|
|||||||
|
|
||||||
meta["x-amz-copy-source"] = urlEncode("/" + bucket + path);
|
meta["x-amz-copy-source"] = urlEncode("/" + bucket + path);
|
||||||
meta["x-amz-metadata-directive"] = "REPLACE";
|
meta["x-amz-metadata-directive"] = "REPLACE";
|
||||||
|
|
||||||
|
delete_stat_cache_entry(path);
|
||||||
|
|
||||||
return put_headers(path, meta);
|
return put_headers(path, meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,6 +208,39 @@ if [ -e $TEST_DIR ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
##########################################################
|
||||||
|
# File permissions test (individual file)
|
||||||
|
##########################################################
|
||||||
|
echo "Testing chmod file function ..."
|
||||||
|
|
||||||
|
# create the test file again
|
||||||
|
echo $TEST_TEXT > $TEST_TEXT_FILE
|
||||||
|
if [ ! -e $TEST_TEXT_FILE ]
|
||||||
|
then
|
||||||
|
echo "Could not create file ${TEST_TEXT_FILE}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ORIGINAL_PERMISSIONS=$(stat --format=%a $TEST_TEXT_FILE)
|
||||||
|
|
||||||
|
chmod 777 $TEST_TEXT_FILE;
|
||||||
|
|
||||||
|
# if they're the same, we have a problem.
|
||||||
|
if [ $(stat --format=%a $TEST_TEXT_FILE) == $ORIGINAL_PERMISSIONS ]
|
||||||
|
then
|
||||||
|
echo "Could not modify $TEST_TEXT_FILE permissions"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# clean up
|
||||||
|
rm $TEST_TEXT_FILE
|
||||||
|
|
||||||
|
if [ -e $TEST_TEXT_FILE ]
|
||||||
|
then
|
||||||
|
echo "Could not cleanup file ${TEST_TEXT_FILE}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Tests are finished
|
# Tests are finished
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user