Reputation: 401
Is there any way in java one can delete a file with no delete permissions on file?
Upvotes: 0
Views: 440
Reputation: 115328
Well, if you mentioned shell script here is a partial work around: if you are on unix and your user can run sudo
execute external command like sudo rm -f YOUR_PATH
.
Upvotes: 2
Reputation: 4202
No, you cannot delete a file if you don't have the permissions. In case you have write permissions, you can make it blank.
Upvotes: 5