fix cread user dir

This commit is contained in:
2025-09-12 20:52:11 +02:00
parent 1a99b55dbb
commit adfe2e7809

View File

@@ -47,12 +47,13 @@ class DummySha256Authorizer(DummyAuthorizer):
)
for ftpuser, user_hash, virtpath, perm in cur.fetchall():
self.add_user(ftpuser, user_hash, virtpath, perm)
# Create the user's directory if it does not exist.
try:
Path(cfg.virtpath + ftpuser).mkdir(parents=True, exist_ok=True)
self.add_user(ftpuser, user_hash, virtpath, perm)
except Exception as e: # pylint: disable=broad-except
self.responde(f"551 Error in create virtual user path: {e}")
def validate_authentication(
self: object, username: str, password: str, handler: object