PDA

View Full Version : how to prevent any folder being deleted accidently ?



asking
07-21-2010, 02:33 AM
hello guyz,

is there any such protection by which our any folder, which is having data wont be deleted accidently when clicked on delete.... any protection ? which will protect folder from being deleted...

please help me need of it...

BestBoard
07-21-2010, 09:10 AM
try with chattr +i folder_name

asking
07-21-2010, 10:18 AM
hey but can i add files in that folder after protecting ?

i want just protection against deletion nothing else...

Peter Laws
07-21-2010, 01:44 PM
via ftp or file manager ( http://help.directadmin.com/item.php?id=166 )?

nobaloney
07-21-2010, 07:39 PM
It's a directory, and not a folder :). To add a file to a directory you must write to the directory (which internally is just a file of links). So the answer is no.

You can keep from deleting a directory by simply having a file in it you can't delete (i.e., an invisible file that's chattr'd immutable).

Try that.

Jeff