LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Tried to delete file as root but it says I don't have permission to delete it! (https://www.linuxquestions.org/questions/mandriva-30/tried-to-delete-file-as-root-but-it-says-i-dont-have-permission-to-delete-it-156155/)

beejayzed 03-11-2004 01:10 AM

Tried to delete file as root but it says I don't have permission to delete it!
 
Today I tried to connect with kppp and it said unable to load libpcap.so.0.
I tried to delete it but it tells me that I don't have permission to delete
it,even if I am root! It seems as if it is supposed to be a link because in the
rpm it is. In konqueror the file doesn't show but in Midnight Commander it shows
but the entry is red. It says that it isn't a link. It seems as if it's
corrupted, the date of the file is 1970!
I did some investigating and in an attempt to fix it tried to uninstall the
libcap package which includes the library. When I tried to install it, it
refuses.

So my question is, how do I delete this file?
Maybe it would it invovle accessing the partitions raw contents?
Please tell me all and any suggestions in as few posts as possible because I'm posting this message in windows because I can't connect(kppp doesn't work).
Thanks to all in advance.

equinox 03-11-2004 02:39 AM

i dunno if this will help, but could you not uninstall kppp and then reinstall it? I dont use dial up so im not sure...

beejayzed 03-11-2004 02:45 AM

I had to uninstall in order to uninstall libpcap.

equinox 03-11-2004 03:04 AM

and is it working now?

beejayzed 03-11-2004 03:07 AM

Well, it uninstalled everything except for the file I can't delete. Back to the drawing board. Oh yeah, and now it won't install.

ernie 03-11-2004 03:08 AM

Usually, when root does not have permission to remove a file, it is because the file belongs to another user account, and the permissions are set so only that user has write permission.

To get arround this, you can [as root] change the files permissions [In Konqueror, alt-click the file, then select properties, and click the permissions tab].

If the file does not appear in Konqueror, click the View Mwnu, and select the Show Hidden Files Option if it is not check-marked. This is not turned on by default. Any hidden files [files which have a . [dot] as the first character] will now be visable.

marghorp 03-11-2004 03:11 AM

If all else fails, boot in single user mode, that way you can change any files permission. This way you will most certainly be able to delete the file. But be careful in this mode as you have all rights (even more than root).

beejayzed 03-11-2004 03:12 AM

Konqueror can't see the file :-(

beejayzed 03-11-2004 03:14 AM

How do I boot into single user mode?

equinox 03-11-2004 03:15 AM

can u not run this command as root?

chown -R user:user /directory/filename

replace user with your username and then obviously where the directory is and actual filename.

bigearsbilly 03-11-2004 03:17 AM

as root have you tried:
rm -f file

or chmod 777 file; rm -f file

beejayzed 03-11-2004 03:18 AM

Well I can't try it at the moment but I think when I tried it it said the file doesn't exist(Although it most definitely does!)

beejayzed 03-11-2004 03:18 AM

I have tried to remove it as root, it says I don't have permission

beejayzed 03-11-2004 03:23 AM

marghorp,
How do I boot into single user mode, it seems as if that is the solution.

bigearsbilly 03-11-2004 03:35 AM

rm -f file ?
or

chmod 777 file; rm file ??

beejayzed 03-11-2004 03:41 AM

rm -f doesn't work, it says I don't have permission.

bigearsbilly 03-11-2004 04:03 AM

do an "ls -l"
on it, let's see what it is

bigearsbilly 03-11-2004 04:04 AM

do "mount", make sure it's not on a read only file system

billy

beejayzed 03-11-2004 04:10 AM

Sorry, I'm posting this message in Windows. Do you know hwo to boot in single user mode. I think the file is a symlink gone bad. It says the date is 1997!

whansard 03-11-2004 04:13 AM

telinit S
at prompt goes to single user.

beejayzed 03-11-2004 04:28 AM

I tried deleting it in single user mode. It still says permission denied! :cry:

beejayzed 03-11-2004 02:41 PM

Okay I did ls -l libpcap.so.0 and it says I don't have permission.

whansard 03-11-2004 06:09 PM

what type of filesystem is it? maybe the filesystem is a little corrupt.

bigearsbilly 03-12-2004 02:46 AM

sounds like jiggered up permissions likely.
where is it?


are you logged in as root?
do you have rwx permissions on the directories?
can you 'cd' to the directory it's in?
can you then do an 'ls' ?

billy


billy


All times are GMT -5. The time now is 07:14 PM.