From 1705ae08cc3410a6bdc8c52745ec290090f88bab Mon Sep 17 00:00:00 2001 From: RafayAhmad7548 Date: Thu, 10 Jul 2025 20:11:23 +0500 Subject: [PATCH] hotfix for user setup guide --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 624cd8c..c356e8c 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ SQLite, PostgreSQL and MYSQL are supported for the database, Authentication can # Installation Start by downloading the tarball from the latest release from the [releases](https://forgejo.fluxgrid.pk/RafayAhmad/flux-sftp/releases), then extract the tarball as follows ```bash -tar -xzvf flux-sftp.tar.gz -C / +sudo tar -xzvf flux-sftp.tar.gz -C / ``` ## Database before you can run the server you need to setup a database, SQLite, PostgreSQL and MYSQL are supported. get a database server running or simply create a sqlite database file and configure the server as mentioned in the [configuration section](#configuration). @@ -16,6 +16,18 @@ the database table should have a username field, and optionally public key and p ***Note that registering users must be done manually by inserting records into the database as of now.*** +## User setup +create a user named fluxsftp as follows +```bash +sudo useradd -r -s /usr/sbin/nologin fluxsftp +``` +this user needs to own the jail directory, make sure to change ownership of the jail directory you have specified in the config +```bash +sudo chown -R fluxsftp:fluxsftp /srv/sftp +``` + +***When u register a new user make sure to create a directory for them in the jail directory and make sure it is owned by the fluxsftp user*** + ## Enable and Start after you have configured the database you can start the server as follows ```bash