[clue-tech] ext3 and immutable symlink?
Jim Ockers
ockers at ockers.net
Wed Mar 31 14:00:46 MDT 2010
Hi CLUEbies,
I want to replace a normal file in a directory with a symlink to
somewhere else. I also want this change to be permanent and immutable;
that is, I want nothing and nobody to be able to get rid of the symlink
and rewrite it with a normal file. Unfortunately it seems that chattr
on ext{23} will not let me make a symlink be an immutable part of a
directory entry.
$ touch oldfile
$ ln -s oldfile newfile
$ ls -al newfile
lrwxrwxrwx 1 ockers ockers 7 Mar 31 13:54 newfile -> oldfile
$ chattr +i newfile
chattr: Operation not permitted while setting flags on newfile
I've tried this a bunch of times on a variety of systems. Sometimes it
applies the chattr attribute to the oldfile, sometimes it just throws an
error, on CentOS too. Can anyone suggest a reliable way to make my
symlink itself immutable without having chattr try to apply the change
in attributes to the target of the symlink?
I can't make the directory itself immutable because that will break too
many things I think.
Thanks,
Jim
--
Jim Ockers, P.Eng. (ockers at ockers.net)
Contact info: http://www.ockers.ca/pason.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue-tech/attachments/20100331/74ee95eb/attachment.html
More information about the clue-tech
mailing list