-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a preference to control clients' permissions. #227
base: master
Are you sure you want to change the base?
Conversation
Ftplet API is interesting. But how would you support permissions in sftp? I thought about implementing permissions in file classes: |
I forgot about SFTP :|
I prefer permissions to be processed by the server rather than file classes (or the filesystem), requests are allowed/disallowed before passing the associated commands to the filesystem. If using file classes gives more benefits, easier debugging, etc., i will use look into them. |
Overriding I can't find |
Well, for both libraries (mina ftpd and mina sshd) it has been necessary to copy their code inside this source tree and do some modifications. For ftpd the reason is that it relies on old school java streams io which stopped working in some android version. For sshd the reason are crypto libraries. mina sshd uses bouncy castle but in some android version it was not possible to use bouncy castle anymore. Also for sshd we are stuck on an older version due to support for JDK versions in android. Probably SftpEventListener is not present in that old version. But even as library code is now part of this source (and there are already modifications) I want to keep modifications to a minimum. I still want to use extension APIs for stuff specific to this app. So far I see file objects (or filesystem abstractions of mina libraries) as primary API between servers and android app. But ftplet and listeners are good ways as well. If you could dig out something for the old sshd it would be great. |
Though the SFTP server can not be initialized for some reason.
I extended But for some reason, the server (SFTP) can't be initialized properly. So i can't test whether my edits are working. If the problem persists I will consider using Filesystem classes, they seem nice to work with. (although it's a bit of a mess) |
Check Spongy Castle, it's Bouncy Castle with minor changes to solve the conflicts Also, new versions of mina-sshd support Java 8. Check: https://github.com/apache/mina-sshd#core-requirements |
Are there exceptions in log?
Even with spongy castle it would be necessary to change code of mina library and thus copy it to this app's code.
Android forces us to stick with java 6. At least with minSDK Version we have right now. And API of newer mina-sshd has changed a lot. If this app would be changed to use it, it would be a lot of work.
See these two commits. I changed that to be able to use preferences in filesystem classes. You might need to rebase your fork. |
Closes #217 .
See: https://mina.apache.org/ftpserver-project/ftplet.html