Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> undeletable files, I would like some.
Termina
post Apr 17 2006, 10:46 PM
Post #1


RMS is my Hero
******

Group: Support Specialist
Posts: 862
Joined: 18-February 04
From: Wisconsin
Member No.: 2,404



chattr tells me that ext2/3 cannot use 'chattr +u filename' to make a file undeletable.

I'd like to be able to put a file in a users directory, and make it impossible for them to remove it.

I try this, for example:

echo "hey" > locked
chown root:root locked
chmod 444 locked
su user
rm -f locked

The user is always able to delete this file, no matter the permissions or who owns it.

Does anyone have a solution for me?

I suppose I could make some unallocated space, use reisefs, and mount it where I need undeleteable files... but that seems like a pain. As does having cron continuously place the file back.

Thanks


--------------------
*Points finger at the author above him* They're a witch! Burn them!
---
Vist my website!
Join me in IRC! Server: st0rage.org Channel: #UnhandledExceptions
Go to the top of the page
 
+Quote Post
dishawjp
post Apr 18 2006, 10:10 AM
Post #2


./configure
***

Group: Members
Posts: 56
Joined: 8-April 04
Member No.: 2,734



Have you tried the:

chattr +i <filename>

command? The immutable switch is supposed to prevent deletion among other things.

I'm also suprised that a file owned by root and chmoded to 444 (read only) can be deleted by a normal user regardless of where it's located.

Jim


--------------------
Registered Linux User 294493
Go to the top of the page
 
+Quote Post
Termina
post Apr 19 2006, 10:03 PM
Post #3


RMS is my Hero
******

Group: Support Specialist
Posts: 862
Joined: 18-February 04
From: Wisconsin
Member No.: 2,404



That did it, thanks. smile.gif


--------------------
*Points finger at the author above him* They're a witch! Burn them!
---
Vist my website!
Join me in IRC! Server: st0rage.org Channel: #UnhandledExceptions
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th October 2017 - 03:39 PM