diff --git a/src/fuse_open.cpp b/src/fuse_open.cpp index 1d247079..1ee8af02 100644 --- a/src/fuse_open.cpp +++ b/src/fuse_open.cpp @@ -142,7 +142,10 @@ _lchmod_and_open_if_not_writable_and_empty(const fs::path &fullpath_, rv = fs::open(fullpath_,flags_); if(rv < 0) - return -EACCES; + { + fs::lchmod(fullpath_,st.st_mode); + return -EACCES; + } fs::fchmod(rv,st.st_mode);