LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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, 09: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, 09:50 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
"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, 10:03 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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, 10: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, 10: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, 12:17 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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, 03:21 AM   #7
englianhu
LQ Newbie
 
Registered: Oct 2015
Location: TonyStark® Workshop
Distribution: CentOS7
Posts: 2

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, 11:42 AM   #8
erik2282
Member
 
Registered: May 2011
Location: TX
Distribution: Debian, CentOS
Posts: 579

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 10:36 AM
Cannot delete expired principal from kerberos system, how delete principals in kerber sarajevo Linux - Security 0 10-19-2007 12:23 PM
How to delete files that won't delete? di11rod Linux - Security 7 10-19-2005 10: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 03:46 AM
force delete/remove and mass file permissions-setting moxieman99 Linux - Newbie 2 02-15-2004 12:43 PM


All times are GMT -5. The time now is 04:51 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration