Prince Charming
Prince Charming

Reputation: 401

Delete a file without delete permission

Is there any way in java one can delete a file with no delete permissions on file?

Upvotes: 0

Views: 440

Answers (2)

AlexR
AlexR

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

Sudhanshu Umalkar
Sudhanshu Umalkar

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

Related Questions