LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Force a Delete (https://www.linuxquestions.org/questions/linux-newbie-8/force-a-delete-611503/)

Flab0y352 01-06-2008 08:46 AM

Force a Delete
 
Hello im trying to delete a dir in my home folder and its telling my access denied ... isnt there a way to force it ive tried........

rmdir --ignore-fail-on-non-empty flock
rmdir --ignore-fail-on-non-empty -p flock


can someone please help?

acid_kewpie 01-06-2008 08:50 AM

"rm -rf dirname" will delete a directory if you have the right to do so. if you don't then it's quite rightfully impossible as that user, in which case root or someone would need to come into play.

pixellany 01-06-2008 09:03 AM

Are you using rmdir or rm -rf?

rmdir only works on empty folders. rm -rf deletes everything, but requires write privileges for the containing folder. (it first has to be able to delete contents before it can delete the folder.)

Also, you must have write privileges to the host directory in order to add or remove anything.

Flab0y352 01-06-2008 09:04 AM

Thank you it worked

marciobarbalho 01-06-2008 09:51 AM

as root
root # chmod -R 755 /home/"username"

Tinkster 01-06-2008 11:17 AM

Quote:

Originally Posted by marciobarbalho (Post 3013300)
as root
root # chmod -R 755 /home/"username"

And which thread was this response meant for? :}



Cheers,
Tink

englianhu 05-29-2016 02:21 AM

Quote:

Originally Posted by marciobarbalho (Post 3013300)
as root
root # chmod -R 755 /home/"username"

Thanks dude, need to grant permission if we have limited authority!

Quote:

Originally Posted by acid_kewpie (Post 3013244)
"rm -rf dirname" will delete a directory if you have the right to do so. if you don't then it's quite rightfully impossible as that user, in which case root or someone would need to come into play.

Thanks dude!

erik2282 05-31-2016 10:42 AM

43,417 posts for that guy!


All times are GMT -5. The time now is 01:56 AM.