-   Linux - Software (
-   -   sticky bit:how to restrict the owner to delete files?? (

hamidhqs 03-06-2012 01:32 AM

sticky bit:how to restrict the owner to delete files??
as you know by means of chmod it's possible to restrict users in different ways,exp:with -t we can restrict o,g users to delet files;but how to restrict the owner from deletion his files??

EricTRA 03-06-2012 01:52 AM

Hello and welcome to LinuxQuestions,

I'd have a look at the man page for chattr. There are some possibilities in there, depending on what exactly you want to do with the file, restrict from deletion/editing/etc.., only append data to the file. Problem is that under all circumstance, AFAIK, the owner has full power on the files he created unless if root set the file to be immutable (chattr +i) or append-only. You could configure the rm command to be interactive if it's not to ask for confirmation whenever someone wants to delete a file but I guess that's not what you're looking for.

Hope this helps.

Looking forward to your participation in the forums. Have fun with Linux.

Kind regards,


All times are GMT -5. The time now is 04:09 AM.