开发者

How to forcefully delete a file

开发者 https://www.devze.com 2023-04-05 21:07 出处:网络
When I try to delete a file I am getting acess deniedas error .How should I set the mode of a file or is there any way of deleting a file forcefully with out ch开发者_运维知识库anging the mode.This qu

When I try to delete a file I am getting acess denied as error .How should I set the mode of a file or is there any way of deleting a file forcefully with out ch开发者_运维知识库anging the mode.


This question is OS-dependent.

With UNIX/Linux it is neccessary to have write permission for the directory containing the file. If the sticky bit is set on the directory (like on /tmp) you have to be owner of the file, too.

If you're using annother OS you may want to refine your question.


You need to change the permissions of the file and its parent folders. As far as I know there is no way to delete a file forefully without having necessary permissions. Adjusting permissions of a file will differ for different operating systems.

for *nix see: chmod

0

精彩评论

暂无评论...
验证码 换一张
取 消