fix cread user dir
This commit is contained in:
@@ -47,13 +47,14 @@ class DummySha256Authorizer(DummyAuthorizer):
|
|||||||
)
|
)
|
||||||
|
|
||||||
for ftpuser, user_hash, virtpath, perm in cur.fetchall():
|
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.
|
# Create the user's directory if it does not exist.
|
||||||
try:
|
try:
|
||||||
Path(cfg.virtpath + ftpuser).mkdir(parents=True, exist_ok=True)
|
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
|
except Exception as e: # pylint: disable=broad-except
|
||||||
self.responde(f"551 Error in create virtual user path: {e}")
|
self.responde(f"551 Error in create virtual user path: {e}")
|
||||||
|
|
||||||
|
|
||||||
def validate_authentication(
|
def validate_authentication(
|
||||||
self: object, username: str, password: str, handler: object
|
self: object, username: str, password: str, handler: object
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user