Comments (4)
at org.apache.sshd.sftp.client.fs.SftpFileSystemProvider.checkAccess(SftpFileSystemProvider.java:826)
at org.apache.sshd.sftp.client.fs.SftpFileSystemProvider.delete(SftpFileSystemProvider.java:581)
at java.base/java.nio.file.Files.delete(Files.java:1152)
There is definitely a problem here. Files.delete()
is specified not to follow symlinks, but SftpFileSystemProvider.checkAccess()
does.
from mina-sshd.
delete of link to existing directory.
Caused by: org.apache.sshd.sftp.common.SftpException: No such file
at org.apache.sshd.sftp.client.impl.AbstractSftpClient.throwStatusException(AbstractSftpClient.java:217)
at org.apache.sshd.sftp.client.impl.AbstractSftpClient.checkResponseStatus(AbstractSftpClient.java:212)
at org.apache.sshd.sftp.client.impl.AbstractSftpClient.checkResponseStatus(AbstractSftpClient.java:186)
at org.apache.sshd.sftp.client.impl.AbstractSftpClient.checkCommandStatus(AbstractSftpClient.java:164)
at org.apache.sshd.sftp.client.impl.AbstractSftpClient.rmdir(AbstractSftpClient.java:817)
at org.apache.sshd.sftp.client.fs.SftpFileSystem$Wrapper.rmdir(SftpFileSystem.java:372)
at org.apache.sshd.sftp.client.fs.SftpFileSystemProvider.delete(SftpFileSystemProvider.java:591)
at java.base/java.nio.file.Files.delete(Files.java:1152)
at nl.qcg.br.releaser.util.FileUtil.fixedFileDelete(FileUtil.java:135)
at nl.qcg.br.releaser.cmds.comp.PathCopier.lambda$remove$3(PathCopier.java:181)
... 19 common frames omitted
Path = usr/share/icons/Humanity-Dark/status@2
# ls -al usr/share/icons/Humanity-Dark/status@2
lrwxrwxrwx 1 root root 6 mrt 18 2022 'usr/share/icons/Humanity-Dark/status@2' -> status/
# ls -ald usr/share/icons/Humanity-Dark/status
drwxr-xr-x 1 root root 16 mrt 2 12:26 usr/share/icons/Humanity-Dark/status
from mina-sshd.
deleting an symbolic link pointing to a file
# ls -ald usr/share/icons/ubuntu-mono-light/stock/22/avatar-default.svg
lrwxrwxrwx 1 root root 22 mrt 18 2022 usr/share/icons/ubuntu-mono-light/stock/22/avatar-default.svg -> stock_person-panel.svg
# ls -ald usr/share/icons/ubuntu-mono-light/stock/22/stock_person-panel.svg
-rw-r--r-- 3 root root 2616 mrt 18 2022 usr/share/icons/ubuntu-mono-light/stock/22/stock_person-panel.svg
Caused by: java.nio.file.NoSuchFileException: usr/share/icons/ubuntu-mono-light/stock/22/avatar-default.svg
at org.apache.sshd.sftp.client.fs.SftpFileSystemProvider.resolveRemoteFileAttributes(SftpFileSystemProvider.java:994)
at org.apache.sshd.sftp.client.fs.SftpFileSystemProvider.lambda$readRemoteAttributes$0(SftpFileSystemProvider.java:969)
at org.apache.sshd.sftp.client.impl.SftpPathImpl.withAttributeCache(SftpPathImpl.java:120)
at org.apache.sshd.sftp.client.impl.SftpPathImpl.withAttributeCache(SftpPathImpl.java:140)
at org.apache.sshd.sftp.client.fs.SftpFileSystemProvider.readRemoteAttributes(SftpFileSystemProvider.java:969)
at org.apache.sshd.sftp.client.impl.AbstractSftpFileAttributeView.readRemoteAttributes(AbstractSftpFileAttributeView.java:71)
at org.apache.sshd.sftp.client.fs.SftpPosixFileAttributeView.readAttributes(SftpPosixFileAttributeView.java:52)
at org.apache.sshd.sftp.client.fs.SftpPosixFileAttributeView.readAttributes(SftpPosixFileAttributeView.java:40)
at org.apache.sshd.sftp.client.fs.SftpFileSystemProvider.checkAccess(SftpFileSystemProvider.java:826)
at org.apache.sshd.sftp.client.fs.SftpFileSystemProvider.delete(SftpFileSystemProvider.java:581)
at java.base/java.nio.file.Files.delete(Files.java:1152)
at nl.qcg.br.releaser.cmds.comp.PathCopier.lambda$remove$3(PathCopier.java:180)
... 19 common frames omitted
Caused by: org.apache.sshd.sftp.common.SftpException: No such file
at org.apache.sshd.sftp.client.impl.AbstractSftpClient.throwStatusException(AbstractSftpClient.java:217)
at org.apache.sshd.sftp.client.impl.AbstractSftpClient.checkAttributesResponse(AbstractSftpClient.java:305)
at org.apache.sshd.sftp.client.impl.AbstractSftpClient.checkAttributes(AbstractSftpClient.java:283)
at org.apache.sshd.sftp.client.impl.AbstractSftpClient.stat(AbstractSftpClient.java:997)
at org.apache.sshd.sftp.client.fs.SftpFileSystem$Wrapper.stat(SftpFileSystem.java:412)
at org.apache.sshd.sftp.client.fs.SftpFileSystemProvider.resolveRemoteFileAttributes(SftpFileSystemProvider.java:981)
... 30 common frames omitted
from mina-sshd.
i can't reproduce the case with the symlink pointing to non-existing file anymore, but i pretty sure there was an exception as well.
from mina-sshd.
Related Issues (20)
- Nmap can scan the version number of Apache mina sshd. Attackers may obtain the version number and find the corresponding vulnerability to attack the system. HOT 1
- Multiple connection to remote sftp using same user throwing FileSystemAlreadyExistsException
- Configurable timeouts in ClientSession#execRemoteCommand
- SSH for power shell support
- sftp clients based on the Mina-sshd and JSCH components upload and download files at very different speeds HOT 19
- [email protected] KEX causing "incorrect signature" with OpenSSH client HOT 9
- Hello, does sshd now support http proxy connections? HOT 1
- Connection reset by peer on high load HOT 5
- The sftp session fails to reuse the clientSession of the ssh session. Procedure HOT 2
- server host key algorithms = ssh-rsa but still try to encryp the key using rsa-sha2-512 HOT 9
- GitSshdSessionFactory - why do I need a credentialsProvider if I've configured the SshSessionFactory? HOT 1
- Client auth: "authentication methods that can continue" is mishandled
- Restricting User Access to Specific Directories in Apache SSHD SFTP Server HOT 1
- sftp subsystem ignores process umask when creating directory HOT 1
- Require JDK 17 for building HOT 6
- Implement no-flow-control extension
- Implements global-requests-ok extension HOT 2
- Implement [email protected] extension
- Implement [email protected] extension
- Plan SSHD 3.0 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mina-sshd.