-
Notifications
You must be signed in to change notification settings - Fork 367
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
exceptions in SftpFileSystemProvider on Files.delete( Path p) #325
Comments
delete of link to existing directory.
|
deleting an symbolic link pointing to a file
|
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. |
There is definitely a problem here. |
tomaswolf
added a commit
to tomaswolf/mina-sshd
that referenced
this issue
Mar 22, 2023
Files.delete() is specified *not* to follow symbolic links. The implementation in SftpFileSystemProvider checked for write access and file existence via a method that does resolve symbolic links. This lead to general inconsistency and various kinds of failures. Fix this by making sure that the code does not resolve symbolic links in Files.delete(). Bug: apache#325
tomaswolf
added a commit
to tomaswolf/mina-sshd
that referenced
this issue
Mar 22, 2023
Files.delete() is specified *not* to follow symbolic links. The implementation in SftpFileSystemProvider checked for write access and file existence via a method that does resolve symbolic links. This lead to general inconsistency and various kinds of failures. Fix this by making sure that the code does not resolve symbolic links in Files.delete(). Bug: apache#325
tomaswolf
added a commit
to tomaswolf/mina-sshd
that referenced
this issue
Mar 22, 2023
Files.delete() is specified *not* to follow symbolic links. The implementation in SftpFileSystemProvider checked for write access and file existence via a method that does resolve symbolic links. This lead to general inconsistency and various kinds of failures. Fix this by making sure that the code does not resolve symbolic links in Files.delete(). Bug: apache#325
tomaswolf
added a commit
to tomaswolf/mina-sshd
that referenced
this issue
Mar 24, 2023
Files.delete() is specified *not* to follow symbolic links. The implementation in SftpFileSystemProvider checked for write access and file existence via a method that does resolve symbolic links. This lead to general inconsistency and various kinds of failures. Fix this by making sure that the code does not resolve symbolic links in Files.delete(). Bug: apache#325
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
sshd-sftp 2.9.2
Bug description
While using a Path on SftpFileSystemProvider:
Exceptions thrown in on Files.delete( Path p), when deleting symbolic links.
Actual behavior
probably the links are followed, and the link is handled like the linkdestination. this causes exceptions.
Expected behavior
No exception but deletion of the symbolic link.
Relevant log output
No response
Other information
Server OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
The text was updated successfully, but these errors were encountered: