dokan-dev / dokany

User mode file system library for windows with FUSE Wrapper
http://dokan-dev.github.io
5.2k stars 661 forks source link

In fuse, the read-only attribute setting of the file is invalid #911

Closed hefengliang closed 4 years ago

hefengliang commented 4 years ago

658 Environment

Check List

Description

I use the following command line to start the fuse sample: mirror.exe M:\ -d -odaemon _timeout= 60 -ovolname=test -ouncname=M:\ -ofsname=FS

I found that setting the doc file as a read-only attribute in FUSE would prompt "The function is incorrect." I copied a doc file with a read-only attribute to fuse, and I found that the read-only attribute disappeared. Is FUSE not supporting this feature? Or is it a bug?

Liryna commented 4 years ago

Hi @hefengliang ,

The sample himself do not support the Win SetAttributes but the wrapper does allows you to handle them by implementing See https://github.com/dokan-dev/dokany/blob/4029f7a60b79a165c8f224dd96fb03f6495a4c26/dokan_fuse/src/fusemain.cpp#L850-L866

https://github.com/dokan-dev/dokany/blob/a164b057e2498dabf875f19ddddc640eeaf0ac9a/dokan_fuse/include/fuse.h#L450-L452

hefengliang commented 4 years ago

@Liryna Thank you very much for your reply, my question has been resolved