can't remove/rename file, even as root

can't remove/rename file, even as root

Post by Jason Fornel » Thu, 15 Feb 2001 07:45:20



I'm running RH 6.1 and was trying to upgrade the bind package via rpm but it
fails saying it is unable to delete (via RPM_DELETE) the /usr/sbin/named file.
I then went in as root and tried to manually remove named but get an error
message saying "rm: cannot unlink `/usr/sbin/named': Operation not permitted".
I'd had a 4 second power outage recently and thought perhaps the problem had to
do with an inode or something being corrupted so I ran fsck to try to fix the
problems that were listed at boot. This did not do the trick.
Besides not being able to remove or overwrite this file, I'm also unable to run
chmod on it...
Any thoughts/suggestions on how I can kill off this pesky file?
Thanks.

-jason

 
 
 

can't remove/rename file, even as root

Post by Mladen Gavrilovi » Thu, 15 Feb 2001 08:36:08


Hmm... possibly I don't know what I'm talking about, but could you be
running the file?  Check with something like "ps -A | grep 'named'".  If
you're running it kill it and then delete the file.

Regards,
Mladen


> I'm running RH 6.1 and was trying to upgrade the bind package via rpm but it
> fails saying it is unable to delete (via RPM_DELETE) the /usr/sbin/named file.
> I then went in as root and tried to manually remove named but get an error
> message saying "rm: cannot unlink `/usr/sbin/named': Operation not permitted".
> I'd had a 4 second power outage recently and thought perhaps the problem had to
> do with an inode or something being corrupted so I ran fsck to try to fix the
> problems that were listed at boot. This did not do the trick.
> Besides not being able to remove or overwrite this file, I'm also unable to run
> chmod on it...
> Any thoughts/suggestions on how I can kill off this pesky file?
> Thanks.

> -jason


 
 
 

can't remove/rename file, even as root

Post by Oliver Wiegan » Thu, 15 Feb 2001 09:11:29



> Hmm... possibly I don't know what I'm talking about, but could you be
> running the file?  Check with something like "ps -A | grep 'named'".  If
> you're running it kill it and then delete the file.

> Regards,
> Mladen


> > I'm running RH 6.1 and was trying to upgrade the bind package via rpm but it
> > fails saying it is unable to delete (via RPM_DELETE) the /usr/sbin/named file.
> > I then went in as root and tried to manually remove named but get an error
> > message saying "rm: cannot unlink `/usr/sbin/named': Operation not permitted".
> > I'd had a 4 second power outage recently and thought perhaps the problem had to
> > do with an inode or something being corrupted so I ran fsck to try to fix the
> > problems that were listed at boot. This did not do the trick.
> > Besides not being able to remove or overwrite this file, I'm also unable to run
> > chmod on it...
> > Any thoughts/suggestions on how I can kill off this pesky file?
> > Thanks.

> > -jason

The ext2 filesystem has a feature,which lets you add attributes
(particular permissions) to files. For example set the attribute
"immutable" (chattr -i),which prohibits changes on files,even by root.
Maybe on of these attributes is set on named ? (lsattr shows them)
Greetings Oli
 
 
 

can't remove/rename file, even as root

Post by Jason Fornel » Thu, 15 Feb 2001 09:24:28




>> Hmm... possibly I don't know what I'm talking about, but could you be
>> running the file?  Check with something like "ps -A | grep 'named'".  If
>> you're running it kill it and then delete the file.

>> Regards,
>> Mladen


>> > I'm running RH 6.1 and was trying to upgrade the bind package via rpm but it
>> > fails saying it is unable to delete (via RPM_DELETE) the /usr/sbin/named file.
>> > I then went in as root and tried to manually remove named but get an error
>> > message saying "rm: cannot unlink `/usr/sbin/named': Operation not permitted".
>> > I'd had a 4 second power outage recently and thought perhaps the problem had to
>> > do with an inode or something being corrupted so I ran fsck to try to fix the
>> > problems that were listed at boot. This did not do the trick.
>> > Besides not being able to remove or overwrite this file, I'm also unable to run
>> > chmod on it...
>> > Any thoughts/suggestions on how I can kill off this pesky file?
>> > Thanks.

>> > -jason

>The ext2 filesystem has a feature,which lets you add attributes
>(particular permissions) to files. For example set the attribute
>"immutable" (chattr -i),which prohibits changes on files,even by root.
>Maybe on of these attributes is set on named ? (lsattr shows them)
>Greetings Oli

Thanks a lot. That's exactly what the problem is (er, was...<grin>).

-jason

 
 
 

can't remove/rename file, even as root

Post by Manish Jethan » Thu, 15 Feb 2001 08:31:34



>I'm running RH 6.1 and was trying to upgrade the bind package via rpm but it
>fails saying it is unable to delete (via RPM_DELETE) the /usr/sbin/named file.
>I then went in as root and tried to manually remove named but get an error
>message saying "rm: cannot unlink `/usr/sbin/named': Operation not permitted".
>I'd had a 4 second power outage recently and thought perhaps the problem had to
>do with an inode or something being corrupted so I ran fsck to try to fix the
>problems that were listed at boot. This did not do the trick.
>Besides not being able to remove or overwrite this file, I'm also unable to run
>chmod on it...
>Any thoughts/suggestions on how I can kill off this pesky file?

Try "lsattr peskyfile" on the cmd line. It'll show you some attributes. Try to
remove the attributes that you don't want using "chattr". Read the man page for
lsattr and chattr.

Manish Jethani

--

Not only is UNIX dead, it's starting to smell really bad.
                -- Rob Pike

 
 
 

1. cannot remove file - even as root !!!!

I have posted several posts on ssh. The level may be
backleveled. I am trying to upgrade uning rpm.

The script file sshd in /etc/rc.d/init.d has somehow gotten
corrupted. It shows a group of root and a owner of lp and a
mod of 700.

rpm attempts to update this file and gets permission denyed
so I shut sshd down and tried to remove it. That action got
the same result.

So I brought the system to init level 1 as root and tried
changing the mod, the owner, the group all to the same
error. I even tried moving it.

How can I remove this file??

Thanks,
Dan

2. UNIX & WIN NT

3. remove file Input/output error - can't even display

4. Disk Cache for Linux?

5. Can't remove a file called "---remove-files"

6. California: San Jose VC++/VB/Multimedia Programmer

7. Can't remove file as root

8. Network Configuration Problems (nameserver)

9. 'passwd' command refuses to work, even for root

10. Even 'cat file >/dev/lp0' doesn't work

11. 2.5.40 kbuild bug: mrproper removes files it shouldn't remove

12. rename files to include each file's timestamp