LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 12-06-2008, 06:59 AM   #1
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,278

Rep: Reputation: 53
File write protected without chattr???


Why can't I remove this file?
root@testserv [~]# rm /usr/local/frontpage/version5.0/apache-fp/_vti_bin/fpexe
rm: remove regular file `/usr/local/frontpage/version5.0/apache-fp/_vti_bin/fpexe'? y
rm: cannot remove `/usr/local/frontpage/version5.0/apache-fp/_vti_bin/fpexe': Operation not permitted

Details:
root@testserv [~]# lsattr /usr/local/frontpage/version5.0/apache-fp/_vti_bin/fpexe
s----a------- /usr/local/frontpage/version5.0/apache-fp/_vti_bin/fpexe
root@testserv [~]# mv /usr/local/frontpage/version5.0/apache-fp/_vti_bin/fpexe /root/
mv: cannot move `/usr/local/frontpage/version5.0/apache-fp/_vti_bin/fpexe' to `/root/fpexe': Operation not permitted
root@testserv [~]# chattr -i /usr/local/frontpage/version5.0/apache-fp/_vti_bin/fpexe
root@testserv [~]# mv /usr/local/frontpage/version5.0/apache-fp/_vti_bin/fpexe /root/
mv: cannot move `/usr/local/frontpage/version5.0/apache-fp/_vti_bin/fpexe' to `/root/fpexe': Operation not permitted
root@testserv [~]# ll /usr/local/frontpage/version5.0/apache-fp/_vti_bin/fpexe
-rwsr-xr-x 1 root bin 7660 Dec 5 15:21 /usr/local/frontpage/version5.0/apache-fp/_vti_bin/fpexe*
root@testserv [~]# rm /usr/local/frontpage/version5.0/apache-fp/_vti_bin/fpexe
rm: remove regular file `/usr/local/frontpage/version5.0/apache-fp/_vti_bin/fpexe'? y
rm: cannot remove `/usr/local/frontpage/version5.0/apache-fp/_vti_bin/fpexe': Operation not permitted
 
Old 12-06-2008, 07:12 AM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
You have the answer in the file attributes. The attribute 'a' means the file can only be open in append mode for writing. You cannot delete nor empty it. If you really want to delete it, just remove the attribute 'a':
Code:
chattr -a /usr/local/frontpage/version5.0/apache-fp/_vti_bin/fpexe
 
  


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
Write Protected Documents bussandtech General 2 05-11-2006 01:02 PM
Cant remove write protected weird file tuxombie Slackware 13 12-07-2004 10:44 AM
unmount write protected disk pradi_net Linux - Hardware 1 05-18-2004 03:48 PM
NTFS Write-Protected? MindFlayer Mandriva 12 05-04-2004 06:36 PM
remove write-protected file randomtask Linux - Newbie 5 04-22-2004 04:06 AM


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