mirror of
https://github.com/usatiuk/remotefs.git
synced 2025-10-25 23:27:49 +02:00
main
RemoteFS
Simple server-client remote filesystem
How to use
- Create an SSL certificate for the server
openssl req -nodes -new -x509 -keyout key.pem -out cert.pem - Create a password hash for the user
echo -n "password" | openssl dgst -sha256 - Copy the password hash into a
usersfile - Start the server
remotefs --mode:server --path:<path to filesystem root> --users_path:users - Copy
cert.pemto the client working directory - Connect with the client
remotefs --mode:client --username:<username> --password:<password> --path:<mount point>
Advanced options
Various options can be overridden using --<option>:<value> syntax
ip- ip server will listen on, or client will connect to, default is127.0.0.1port- port server will listen on, or client will connect to, default is42069default_log_level- default logging level, 1 is least verbose, 4 is most verbose, default is2timeout- timeout, default is 30 (seconds)ca_path- path to SSL certificate, default iscert.pempk_path- path to SSL private key (for server), default iskey.pemmode- server or client, default isserverpath- filesystem root to server or mountpoint for server and client (default is empty)acl_path- path for an ACL config file, default is empty (and everything is allowed)users_path- path for file with user passwords (default isusers)username- username to use for clientpassword- password to use for client
Example with some of these options:
remotefs --mode:client --default_log_level:3 --timeout:10 --username:user2 --password:password2 --path:"${HOME}/remotefs-test/mount2" --ip:192.168.88.20
ACL and users configuration
Username passwords can be configured in a users file, with a simple format
<username> <sha256 password hash>
For example, two users with password password
username 5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8
username2 5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8
ACL can be configured in an optionally specified acl file, with format:
<path prefix> <allowed users, separated by string>
If user list is empty, then everyone is allowed. If there are multiple entries with same prefix, the more specific one has higher priority.
Example:
/ user1
/A user1 user2
/B user2
/C
In this example, all files will be accessible "by default" only by user1,
with files in directory /A by user1 and user2, in directory /B by user2, and in
directory /C by everyone.
Description
Languages
C++
96.3%
CMake
3.7%