Comments (10)
Hi, @philrykoff!
I believe it is better to ask that question on the winfsp
repo. As far as I understand, it is all about mapping unix-style fuse permission to windows permissions through winfsp
. If it is possible on the fuse layer of winfsp
then there should be no problem to do the same via jnr-fuse
.
from jnr-fuse.
I was unsure whom to ask myself π
The creator of WinFSP commented on my request here winfsp/winfsp#114 (comment)
Basically, he is saying that osxfuse has extensions called chflags
for similar requirements. Do you know about this feature of might it already be implemented in jnr-fuse? Please feel free to comment over there π
from jnr-fuse.
Here is some info I found about chflags
:
- Usage in osxfuse: https://github.com/osxfuse/fuse/blob/master/example/fusexmp_fh.c#L299-L426
- Apple man file: https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/chflags.1.html
This indeed looks like it could be helpful. If we would have a somewhat similar API for OSX and Win, would that be something you would consider as an addition?
from jnr-fuse.
@SerCeMan: billziss-gh implemented the changes needed in WinFSP (winfsp/winfsp#114).
It seems osxfuse has a similar implementation already done using chflags
:
Usage in osxfuse: https://github.com/osxfuse/fuse/blob/master/example/fusexmp_fh.c#L299-L426
Apple man file: https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/chflags.1.html
For Linux, my only find was chattr
, but that only works for ext2/3/4 file systems.
A proper solution would probably implement Windows and MacOS, optionally Linux. Based on the jnr-fuse code I already saw, I feel comfortable to implement the Windows part. I would have time in about two weeks to pick this up, if no one feels eager to do so beforehand. π
from jnr-fuse.
@philrykoff ping me when you have such a PR ready. I may have suggestions on how to ensure that jnr-fuse remains backwards/forwards compatible with different versions of WinFsp. [Caveat: I am very rusty on Java.]
BTW, I am implementing these changes in cgofuse. Related issue is winfsp/cgofuse#20. You may want to keep an eye as I have to face similar compatibility issues. [E.g. what happens when the latest cgofuse is used with a version of WinFsp that does not have the FSP_FUSE_CAP_STAT_EX
capability.]
from jnr-fuse.
Based on the jnr-fuse code I already saw, I feel comfortable to implement the Windows part. I would have time in about two weeks to pick this up, if no one feels eager to do so beforehand.
That sounds great to me π . Feel free to reach out if you need any help!
from jnr-fuse.
The winfsp/cgofuse#20 issue is now closed. Most of it is not relevant to this discussion, except that it solves the problem of using a version of cgofuse with flags capability with a version of WinFsp that does not have this capability (e.g. latest cgofuse with WinFsp v1.1 which does not have BSD flags support).
Here is the relevant code from cgofuse:
// during FUSE init
conn->want |= conn->capable & FSP_FUSE_CAP_STAT_EX;
cgofuse_stat_ex = 0 != (conn->want & FSP_FUSE_CAP_STAT_EX);
And:
// during copy of Go struct stat to C struct stat
if (cgofuse_stat_ex)
((struct fuse_stat_ex *)stbuf)->st_flags = flags;
Here is how this works. A newer version of WinFsp will pass FSP_FUSE_CAP_STAT_EX
during init
signifying that it supports BSD flags. So we respond that we want this capability. We also remember that the capability is supported so that we can copy the flags
whenever we need to pass a struct stat
from Go to C.
An older version of WinFsp will not pass FSP_FUSE_CAP_STAT_EX
and no flags
copying will happen.
Apologies if all this is too obvious.
from jnr-fuse.
Documentation is never bad. Thanks for the helpful insights π
from jnr-fuse.
Please note that WinFsp v1.2B3 has been released. It has support for BSD flags, chflags, setcrtime and setchgtime.
from jnr-fuse.
Was this eventually implemented in jnr-fuse ?
I do not see whether it is actually done.
Edited: Would be appreciated if someone could show me how to get round this issue to be able to set the Windows extra-attibutes 'SYSTEM'/'READONLY'.
from jnr-fuse.
Related Issues (20)
- Java 9 module support HOT 1
- write throughput very low compared to read HOT 1
- Problem with samba share folders (jnr-fuse + winfsp) HOT 2
- Capturing SetSecurity events HOT 2
- Fix CVE-2014-4043 HOT 4
- Wrong dependency scopes in release 0.5.6 HOT 2
- GraalVM native image support
- Winfsp and jnr-fuse not working HOT 3
- Why not implement the inode interface provided by kernel fuse to replace the current path interfaceοΌ HOT 5
- Program doesn't shut down properly in some cases on windows
- JVM crash with jnr-fuse and javafx
- WinFsp 1.12 doesn't pass the CI check
- Test failures on AWS Graviton (ARM, aarch64 GNU/Linux)
- Winfsp read callback random offset
- I can't get getxattr() working HOT 1
- -bash: cd : mydirectory: Input/output error HOT 1
- Path Problem with Windows HOT 6
- The wrapper.jar is stale. HOT 4
- Can't run in gradle HOT 2
- Multiple folders created by FUSE cannot be monitored at the same time HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jnr-fuse.