LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Closed Thread
  Search this Thread
Old 12-04-2007, 07:52 AM   #1
ganeshamutha@gmail.c
LQ Newbie
 
Registered: Sep 2007
Posts: 5

Rep: Reputation: 0
Thumbs up creating never deleting file.


Hi all..

I want to create a file which never delete from any of command, utility,any user and it should removed only when i format my disk..

Could you any one tell me the solution or idea?


Thanks in advance.
Ganesh
 
Old 12-04-2007, 10:27 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Making one file bulletproof is hard, you could use chattr to set the immutable (i) flag. This makes it impossible to remove the file (even for root), but root can use chattr to undo the immutable flag and delete the file anyway. It's just an extra layer.

See the manpages for chattr and lsattr.

Hope this helps.
 
Old 12-04-2007, 10:44 AM   #3
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Reported as a duplicate thread:

http://www.linuxquestions.org/questi...-file.-604393/
http://www.linuxquestions.org/questi...-file.-604392/
http://www.linuxquestions.org/questi...-file.-604395/
 
Old 12-04-2007, 11:04 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Mmmmm......

Time wasted on a newbie that didn't read the rules (or used common sense for that matter).

@ganeshamutha@gmail.c: Thanks!
 
Old 12-09-2007, 06:36 PM   #5
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread



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
creating never deleting file. ganeshamutha@gmail.c Linux - General 4 12-04-2007 10:57 AM
creating or deleting files in cpp milky.way Programming 2 11-27-2007 05:56 PM
deleting a file intellscreen Linux - Newbie 3 11-02-2003 12:39 PM
deleting orphan files and creating soft links cuss Linux - General 6 02-24-2003 09:43 AM
Deleting a file...... lucifer Linux - Software 0 09-03-2002 03:36 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 05:08 PM.

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