I haven’t really tried this, but I think it could work. SeaDrive does use a fuse mount, so the SeaDrive program .
winfsp is FUSE ported for windows. How might SeaDrive be configured for winfsp or an alternative?
would have to run as the same user as the sftp server for the server to be able to see into the SeaDrive directories
The library tree is controlled by the server and the remote user can only shuv files in and out, and is not allowed to do any sharing. Users access trees belonging to the server admin. I take it this is possible.
I don’t know of an API in seafile that could notify your program that a new file has been created, so if someone else does, I would encourage them to respond. You might be able to use inotify to have the OS tell your program that a file has been added. But my experience several years ago with inotify and fuse mounts wasn’t great.
I have used inotify; will SeaDrive be tolerant to it. Will SeaDrive allow a compiled C++ application in the back end direct access to the libraries or will it be required to go through SeaDrive? If so, is there an API or functions the C++ must use?
Instead I would suggest a cron job to check once every 5 minutes (or 1 minute or whatever) for new files files in the “inbox” directory. That’s a pattern I’ve used a few times and it’s pretty easy to work with (easy to troubleshoot to get it working, and seems to pretty reliably stay working).
I will consider cron of inotify faces problems.
Again because of the fuse mount your program would also need to run as the same user that runs the SeaDrive client for it to have access to pull files out of the inbox and write completed work to the outbox directory.
It is the compiled C++ on the server back end behind SeaFile that is providing service by processing files for the remote users and putting the resulting files in download libraries where the remote user expects them. The remote user is not the one providing a service in this application.
As an alternative, you might try the seafile client instead of SeaDrive. This has the advantage of not needing the fuse mount, so the client doesn’t need to run as the same user as the sftp server. This could make inotify work better if you really want to use it. The only disadvantage I can think of is that seafile expects to sync the entire library, so this application server needs enough disk space for all the files in the library, where SeaDrive might only need a few GBs for the most recently accessed bits.
In this application, the server is not used as a storage space; files are uploaded (one or a few at a time) through an upload library, taken away and processed by the C++ and resulting files are placed in a download library. Not really concerned about Gigs of space or syncing overhead. I am not an IT person. I am in Semiconductor Design and Verification needing a ready made solution for this. I may place the application as open source later. For now I need a prototype with some functionality to get other people interested to contribute.
If there is no network drive, how will remote users work? Where will the files needing processing be placed to get uploaded to the server? Is it command line? Users are not computer savvy and may not be interested in computers.
If you do use seafile both seafile and sftp will need sufficient access to the files, so you might need to make sure both users are in a group together, and maybe set the sticky permission on the sync directories, but that’s not too hard to deal with.
Regarding access, the server admin has control over the libraries and not the user. The admin can create a tree and a corresponding user group of one person plus the admin. In my mind that should solve the access problem. The remote user is not allowed to do any sharing; he cannot create libraries. I hope that is possible or I may not be able to use Sea/File/Drive.
I have yet find out what the sticky bit does/is. Will transfer in both directions be in sftp?
By the way, for security purposes, currently each remote user has his own sftp root jail and no ssh login. I can do away with those if Sea/Drive/File has sufficient security.