You are not logged in.

#1 2007-04-19 03:13:23

amunimanghi
Member
Registered: 2006-11-21
Posts: 78

Lock a file

Hi,

I am wondering if it is possible to lock a document on my computer. My siblings tend to delete and/or open files and mess around with them. They do have an extensive knowledge of Linux and their actions are more of malice. roll I am wondering if it would be possible to put a password on a file so that when you want to open it, it will ask for the password. The root account wouldn't be sufficiant. Thanks. big_smile

~Amunimanghi

Offline

#2 2007-04-19 03:28:18

sincity
Member
Registered: 2005-12-15
Posts: 63

Re: Lock a file

man chattr

A file with the `i' attribute cannot be modified: it cannot be  deleted
or  renamed,  no  link  can  be created to this file and no data can be
written to the file.  Only the superuser or a  process  possessing  the
CAP_LINUX_IMMUTABLE capability can set or clear this attribute.

Offline

Board footer

Powered by FluxBB