LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-06-2008, 08:46 AM   #1
Flab0y352
Member
 
Registered: Aug 2007
Location: Sunshine State
Distribution: Debian Testing
Posts: 72

Rep: Reputation: 15
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?
 
Old 01-06-2008, 08:50 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
"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.
 
Old 01-06-2008, 09:03 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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.
 
Old 01-06-2008, 09:04 AM   #4
Flab0y352
Member
 
Registered: Aug 2007
Location: Sunshine State
Distribution: Debian Testing
Posts: 72

Original Poster
Rep: Reputation: 15
Thank you it worked
 
Old 01-06-2008, 09:51 AM   #5
marciobarbalho
Member
 
Registered: Dec 2007
Location: Brazil
Distribution: slackware 13
Posts: 151

Rep: Reputation: 30
as root
root # chmod -R 755 /home/"username"
 
Old 01-06-2008, 11:17 AM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by marciobarbalho View Post
as root
root # chmod -R 755 /home/"username"
And which thread was this response meant for? :}



Cheers,
Tink
 
Old 05-29-2016, 02:21 AM   #7
englianhu
LQ Newbie
 
Registered: Oct 2015
Location: Sςιβrοκεrs TrαdιηgŪ
Distribution: CentOS, Ubuntu
Posts: 12

Rep: Reputation: Disabled
Wink

Quote:
Originally Posted by marciobarbalho View Post
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 View Post
"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!
 
Old 05-31-2016, 10:42 AM   #8
erik2282
Member
 
Registered: May 2011
Location: Texas
Distribution: Primarily Deb/Ubuntu, and some CentOS
Posts: 829

Rep: Reputation: 229Reputation: 229Reputation: 229
43,417 posts for that guy!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Force delete key to work in aix ksh ? Vilius AIX 10 05-11-2011 09:36 AM
Cannot delete expired principal from kerberos system, how delete principals in kerber sarajevo Linux - Security 0 10-19-2007 11:23 AM
How to delete files that won't delete? di11rod Linux - Security 7 10-19-2005 09:14 PM
Tried to delete file as root but it says I don't have permission to delete it! beejayzed Mandriva 23 03-12-2004 02:46 AM
force delete/remove and mass file permissions-setting moxieman99 Linux - Newbie 2 02-15-2004 11:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration