DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 18th July 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default Cannot delete it....

Code:
killasmurf# rm -R tmp
override r-xr-xr-x  root/wheel schg for tmp/temproot/var/empty? y
rm: tmp/temproot/var/empty: Operation not permitted
rm: tmp/temproot/var: Directory not empty
rm: tmp/temproot: Directory not empty
rm: tmp: Directory not empty
killasmurf# cd tmp/temproot/var/
killasmurf# ls -la
total 6
drwxr-xr-x  3 root  wheel  512 Jul 15 22:10 .
drwxr-xr-x  3 root  wheel  512 Jul 15 22:10 ..
dr-xr-xr-x  2 root  wheel  512 Jul 15 09:46 empty
killasmurf# cd empty
killasmurf# ls -la
total 4
dr-xr-xr-x  2 root  wheel  512 Jul 15 09:46 .
drwxr-xr-x  3 root  wheel  512 Jul 15 22:10 ..

I can't delete that dam directory...
and it's empty
i remember there was program for setting some kind of flags....
perhaps it can help.... but i don't remember name....


any ideas?
Ye, and i ran it as root with su


This was left over after i rebuild world
Reply With Quote
  #2   (View Single Post)  
Old 18th July 2008
dk_netsvil dk_netsvil is offline
Real Name: Devon
Fdisk Soldier
 
Join Date: May 2008
Location: New York
Posts: 75
Default

Are you thinking of the chflags command?

http://www.freebsd.org/cgi/man.cgi?q...lags&sektion=1

Or maybe the chattr command?

http://linux.about.com/od/commands/l/blcmdl1_chattr.htm

Last edited by dk_netsvil; 18th July 2008 at 09:26 PM.
Reply With Quote
  #3   (View Single Post)  
Old 18th July 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

Yes, thanks, now reading man

do you have any idea what flag could it be?
Reply With Quote
  #4   (View Single Post)  
Old 18th July 2008
dk_netsvil dk_netsvil is offline
Real Name: Devon
Fdisk Soldier
 
Join Date: May 2008
Location: New York
Posts: 75
Default

chattr -i should remove the immutable attribute.
Reply With Quote
  #5   (View Single Post)  
Old 18th July 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

command not found
Reply With Quote
  #6   (View Single Post)  
Old 18th July 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

Code:
killasmurf# chflags 0 empty
killasmurf# rm -R empty

solved, thanks
Reply With Quote
  #7   (View Single Post)  
Old 18th July 2008
dk_netsvil dk_netsvil is offline
Real Name: Devon
Fdisk Soldier
 
Join Date: May 2008
Location: New York
Posts: 75
Default

Ok, you've probably got chflags - I believe the syntax to set the immutable bit for chflags is:

chflags nouchg

or chflags nouunlink
Reply With Quote
  #8   (View Single Post)  
Old 18th July 2008
dk_netsvil dk_netsvil is offline
Real Name: Devon
Fdisk Soldier
 
Join Date: May 2008
Location: New York
Posts: 75
Default

cool beans.
Reply With Quote
  #9   (View Single Post)  
Old 18th July 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

Quote:
Originally Posted by dk_netsvil View Post
Ok, you've probably got chflags - I believe the syntax to set the immutable bit for chflags is:

chflags nouchg

or chflags nouunlink
uchg is user immutable, not system immutable /var/empty has the system immutable flag set (schg), like the error message indicated:

Code:
override r-xr-xr-x  root/wheel schg for tmp/temproot/var/empty? y
As has already been mentioned, you can use chflags(1) to remove the schg flags.
Please note that if your system's securelevel is set then schg (and sappnd) can not be removed for obvious reasons.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
Old 20th July 2008
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 696
Default

Answering y at the end of a mergemaster run will automatically clear this out for you.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
Reply

Tags
flags, permissions, rw error

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FreeBSD console delete key graudeejs FreeBSD General 4 24th August 2008 01:37 PM
Both versions installing in same location, & can't delete jaymax FreeBSD General 5 9th June 2008 06:25 PM
Delete Files By Schedule plexter OpenBSD General 12 4th June 2008 10:15 PM
How to delete account? khdf Feedback and Suggestions 5 9th May 2008 09:05 PM


All times are GMT. The time now is 06:29 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick