File attributes puzzle

Anne Wilson cannewilson at googlemail.com
Thu Mar 31 10:53:55 UTC 2011


On Thursday 31 March 2011 10:26:10 Giuliano Colla wrote:
> Anne Wilson ha scritto:
> > I have a small text file that I want to ensure cannot be accidentally
> > deleted, so I ran
> > 
> > chattr -i /home/anne/WebPages/UserBase/filename.txt
> > 
> > (as root, of course).  Running lsattr against the same file produced
> > 
> > -------------e- /home/anne/WebPages/UserBase/filename.txt
> > 
> > 'i' doesn't show in ls -l filename, either.  I haven't come across 'e'
> > before. What is it, and is my file immutable or not?
> > 
> > Anne
> 
> 1) You must be superuser (i.e. login as root, or use /su/) in order to
> have chattr set the /i /attribute/.
> 2) -i /*removes* the i attribute, doesn't set it. From chattr man page,
> the rule is: - sign removes, + sign adds = sign makes it the only
> attribute. You should type:
> 
> chatttr +i /home/anne/etc..
> 
> then with lsattr you'll see something like:
> ----i-------- file.txt
> 
Thanks, both of you.  Definitely a Duh! moment.  Put it down to senility ;-)

Anne
-- 
New to KDE Software? - get help from http://userbase.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://lists.fedoraproject.org/pipermail/kde/attachments/20110331/9f6d15bb/attachment.bin 


More information about the kde mailing list