You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 16, 2021. It is now read-only.
I was able to get standardnotes-fs to run on Windows but wasn't able to get it to actually work. Because I was originally using dummy gid and uid values, I would get permission denied errors (similar to this user doing a similar migration)
It seems the only change that needs to be made is to have Windows call it's equivalent of getuid() and getgid() and then register the conversion from Windows sid to uid/gid with winfsp. I tried my best but got stuck when trying to convert between the pywin32 sid object and the winfspycffi binding sid object. They're not the same size and the latter doesn't expose anything do me to use and I'm not familiar enough with the intricacies of these frameworks to get further.
Here's what I ended up with, replaced a few lines in sn_fuse.py
fromplatformimportsystem_system=system()
if_system=='Windows'or_system.startswith('CYGWIN'):
#Convert windows sid to uid and gid with WinFSP#use WinFSP bindingsfromwin32securityimportGetTokenInformation, OpenProcessToken, TOKEN_QUERY, TokenUserfromwin32processimportGetCurrentProcessfromwinfspy.operationsimportlibsid=GetTokenInformation(OpenProcessToken(GetCurrentProcess(), TOKEN_READ), TokenUser)
lib.FspPosixMapSidToUid(sid[0], 2) #Errors, here, sid is a PySID (from pywin32), where lib FspPosixMapSidToUid expects a cffi PSIDlib.FspPosixMapSidToUid(sid[0], 3)
self.uid=2self.gid=3else:
self.uid=os.getuid()
self.gid=os.getgid()
Your upstream
fusepysupports Windows usingwinfsp.I was able to get
standardnotes-fsto run on Windows but wasn't able to get it to actually work. Because I was originally using dummy gid and uid values, I would get permission denied errors (similar to this user doing a similar migration)It seems the only change that needs to be made is to have Windows call it's equivalent of
getuid()andgetgid()and then register the conversion from Windows sid to uid/gid with winfsp. I tried my best but got stuck when trying to convert between thepywin32sid object and thewinfspycffibinding sid object. They're not the same size and the latter doesn't expose anything do me to use and I'm not familiar enough with the intricacies of these frameworks to get further.Here's what I ended up with, replaced a few lines in
sn_fuse.py