LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-18-2005, 06:22 AM   #1
unleashed
LQ Newbie
 
Registered: Apr 2005
Distribution: FreeBSD, Debian
Posts: 9

Rep: Reputation: 0
file permission problem


hi,

here is file with following permissions and user ID's (actually there's no those ID's on my linuxbox)

-rwxr-xr-x 1 122 114 31504 Apr 9 2003 ifconfig

in fact, i can't it delete with root or each other user

#rm ifconfig
rm: remove write-protected regular file `ifconfig'? y
rm: cannot remove `ifconfig': Operation not permitted

# chown root:root ifconfig
chown: changing ownership of `ifconfig': Operation not permitted

how delete this file?


regards,
ks
 
Old 04-18-2005, 06:35 AM   #2
BNI
LQ Newbie
 
Registered: Sep 2004
Distribution: Linux from Scratch 6.0, ClarkConnect server/gateway
Posts: 21

Rep: Reputation: 15
For a start, why would you want to delete the ifconfig binary? I generally find it pretty useful..

Anyway, if you can't delete it as root, it's not a permissions problem, most likely the program is in use. You could try bringing down all network activity first. ("#init 2" for me)
 
Old 04-18-2005, 06:40 AM   #3
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
or init 1

but really, deleting ifconfig is a stupid thing. Why do that?
 
Old 04-18-2005, 06:46 AM   #4
unleashed
LQ Newbie
 
Registered: Apr 2005
Distribution: FreeBSD, Debian
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by BNI
For a start, why would you want to delete the ifconfig binary? I generally find it pretty useful..

Anyway, if you can't delete it as root, it's not a permissions problem, most likely the program is in use. You could try bringing down all network activity first. ("#init 2" for me)
chkrootkit reports, that it INFECTED, so i need delete it ant replace with good one

i have ~10 files with those strange permissions and ID's and, of course, i can't delete em'all

for example
ls -l /usr/sbin/lsof
-rwxr-xr-x 1 122 114 82628 Jul 18 2002 /usr/sbin/lsof

Last edited by unleashed; 04-18-2005 at 06:53 AM.
 
Old 04-18-2005, 10:15 AM   #5
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
what distro are u using?
Why not replace the whole package?
 
Old 04-18-2005, 11:52 AM   #6
unleashed
LQ Newbie
 
Registered: Apr 2005
Distribution: FreeBSD, Debian
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by perfect_circle
what distro are u using?
Why not replace the whole package?
i'm using debian


dpkg --ignore-depends=ifupdown -r net-tools
(Reading database ... 21778 files and directories currently installed.)
Removing net-tools ...
dpkg - warning: while removing net-tools, unable to remove directory `/bin/netst
at': Operation not permitted - directory may be a mount point ?
dpkg - warning: while removing net-tools, unable to remove directory `/sbin/ifco
nfig': Operation not permitted - directory may be a mount point ?
toksgw:/home/kestutis# apt-get install net-tools
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
net-tools
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 231kB of archives.
After unpacking 623kB of additional disk space will be used.
Get:1 http://debian.balt.net woody/main net-tools 1.60-4 [231kB]
Fetched 231kB in 3s (60.2kB/s)
Selecting previously deselected package net-tools.
(Reading database ... 21746 files and directories currently installed.)
Unpacking net-tools (from .../net-tools_1.60-4_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/net-tools_1.60-4_i386.deb (--unpa
ck):
unable to make backup link of `./sbin/ifconfig' before installing new version:
Operation not permitted
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/net-tools_1.60-4_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
 
Old 04-18-2005, 04:37 PM   #7
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
I'd try to use a live-CD, e.g RIP, system-rescue or Knoppix
to clean the box up ... REALLY I'd just grab the most crucial
data, copy config files you don't want to lose and re-install
the box ...


Cheers,
Tink
 
Old 04-18-2005, 04:42 PM   #8
rshaw
Senior Member
 
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,692

Rep: Reputation: 45
have a 2nd look with rkhunter, chkrootkit kit has been known to generate false positives with the newer kernels
 
Old 04-18-2005, 04:42 PM   #9
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Go to the Security forum and read the sticky threads on what to do in case of a rootkit.

Moved: This thread is more suitable in Linux-Security and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 04-20-2005, 04:22 PM   #10
unleashed
LQ Newbie
 
Registered: Apr 2005
Distribution: FreeBSD, Debian
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by Tinkster
I'd try to use a live-CD, e.g RIP, system-rescue or Knoppix
to clean the box up ... REALLY I'd just grab the most crucial
data, copy config files you don't want to lose and re-install
the box ...


Cheers,
Tink
i've booted gentoo liveCD, mounted my HDD and, when trying
to rm getting same:

#rm ifconfig
rm: remove write-protected regular file `ifconfig'? y
rm: cannot remove `ifconfig': Operation not permitted

or

#rm netstat
rm: remove write-protected regular file `ifconfig'? y
rm: cannot remove `ifconfig': Permission denied



how to overide these permissions and ID's to remove these infected files?

Last edited by unleashed; 04-20-2005 at 04:55 PM.
 
  


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
File system permission problem after FC4 install BBQ_Matt Red Hat 5 06-26-2005 01:13 AM
Apache File Permission Strange Problem hcubed Linux - Networking 1 05-15-2004 01:09 AM
File Permission Problem Scythe Slackware 1 01-12-2004 11:37 PM
Permission on one file. TheRealDeal Linux - General 4 12-17-2003 10:59 PM
File permission problem nuttyvishal4u Linux - General 1 08-21-2003 02:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:00 AM.

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