Skip to content

fix(storage-service): delete files over SFTP instead of shell rm#654

Merged
yasithdev merged 1 commit into
apache:masterfrom
yasithdev:fix/sftp-file-delete
Jun 9, 2026
Merged

fix(storage-service): delete files over SFTP instead of shell rm#654
yasithdev merged 1 commit into
apache:masterfrom
yasithdev:fix/sftp-file-delete

Conversation

@yasithdev

Copy link
Copy Markdown
Contributor

UserStorageService.deleteFile ran 'rm -f' via executeCommand, which the SFTP storage adaptor doesn't support, so every user-storage file delete failed with 'Command execution not supported on storage resources'. Add SSHJStorageAdaptor.deleteFile (SFTP remove) to the StorageResourceAdaptor interface and call it from deleteFile, mirroring how deleteDir already uses the adaptor's rmdir. Verified live: upload -> delete round-trips.

UserStorageService.deleteFile ran "rm -f <path>" via adaptor.executeCommand,
but the SFTP storage adaptor does not support command execution, so every file
delete failed with "Command execution not supported on storage resources".
Add a deleteFile to the storage adaptor (SFTP rm) and call it, mirroring how
deleteDir already uses deleteDirectory (SFTP rmdir).

Validated live: uploading then deleting a file now succeeds (the file is gone).
@yasithdev yasithdev merged commit 2a034e7 into apache:master Jun 9, 2026
5 of 6 checks passed
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

Successfully merging this pull request may close these issues.

1 participant