Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sftp mkdir ./test fails #2063

Closed
micheloosterhof opened this issue Jan 14, 2024 · 1 comment
Closed

sftp mkdir ./test fails #2063

micheloosterhof opened this issue Jan 14, 2024 · 1 comment

Comments

@micheloosterhof
Copy link
Member

2024-01-14T08:17:55.880723Z [HoneyPotSSHTransport,160730,208.65.84.121] SFTP makeDirectory: b'./.4041218115438369514'
2024-01-14T08:17:55.881278Z [twisted.conch.ssh.filetransfer.FileTransferServer#critical] Request b'\x00\x00\x00\x01' failed with unknown error: ()
        Traceback (most recent call last):
          File "/home/cowrie/cowrie-env/lib/python3.11/site-packages/twisted/conch/ssh/session.py", line 165, in dataReceived
            self.client.transport.write(data)
          File "/home/cowrie/cowrie-env/lib/python3.11/site-packages/twisted/conch/ssh/session.py", line 225, in write
            self.proto.dataReceived(data)
          File "/home/cowrie/cowrie-env/lib/python3.11/site-packages/twisted/conch/ssh/filetransfer.py", line 88, in dataReceived
            f(data)
          File "/home/cowrie/cowrie-env/lib/python3.11/site-packages/twisted/conch/ssh/filetransfer.py", line 297, in packet_MKDIR
            d = defer.maybeDeferred(self.client.makeDirectory, path, attrs)
        --- <exception caught here> ---
          File "/home/cowrie/cowrie-env/lib/python3.11/site-packages/twisted/internet/defer.py", line 209, in maybeDeferred
            result = f(*args, **kwargs)
          File "/home/cowrie/cowrie/src/cowrie/shell/filetransfer.py", line 195, in makeDirectory
            self.fs.mkdir2(path)
          File "/home/cowrie/cowrie/src/cowrie/shell/fs.py", line 517, in mkdir2
            self.mkdir(path, 0, 0, 4096, 16877)
          File "/home/cowrie/cowrie/src/cowrie/shell/fs.py", line 375, in mkdir
            directory = self.get_path(os.path.dirname(path.strip("/")))
          File "/home/cowrie/cowrie/src/cowrie/shell/fs.py", line 234, in get_path
            raise FileNotFound
        cowrie.shell.fs.FileNotFound: 
@micheloosterhof
Copy link
Member Author

This is actually due to the home directory of the user not existing. If you add users to your credentials, also create their respective home directories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant