Giter Site home page Giter Site logo

Comments (4)

tomaswolf avatar tomaswolf commented on August 24, 2024 1
	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.

sijskes avatar sijskes commented on August 24, 2024

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.

sijskes avatar sijskes commented on August 24, 2024

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.

sijskes avatar sijskes commented on August 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.