the SFTP default home directory in jumpserver is under/tmp
modify default home directory:
vim /usr/local/coco/coco/sftp.py class SFTPServer(paramiko.SFTPServerInterface): root = '/tmp' # Change the home directory to the directory you want to specify, e.g: root = '/'
after modification, it is found that it cannot be uploaded or downloaded, and the error is reported as follows:
at this time, pay attention to the permission of the home directory you changed. After changing the permission to 777, it is normal
Similar Posts:
- [Solved] The paramiko module failed to upload the file: paramiko.ssh_exception.SSHException: Channel closed.
- Paramiko Error: Garbage packet received [How to Solve]
- [How to Solve] This service allows sftp connections only
- Node uses SSH2 SFTP Client to upload and download FTP files
- SSHException: Error reading SSH protocol banner
- [Solved] su: warning: cannot change directory to : Permission denied ;-bash: bash_profile: Permission denied
- Jenkins ios rror: No signing certificate “iOS Distribution” found: No “iOS Dist…
- Module not founderror: no module named ‘paramiko’ in Python 3.7.2
- [Solved] Upload Files Request processing failed;nested exception is org.springframework.web.multipart.MultipartException:Failed to parse multipart servlet request;multipart/form-data request failed.(**No permission**)
- SFTP connection test report error permission denied, please try again