fix cread user dir
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user