<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=us-ascii" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi David,<br>
<br>
Ya I should have mentioned as part of the variety of systems I've tried
it on, I was as root sometimes and that doesn't work either.<br>
<br>
Jim<br>
<br>
David L. Willson wrote:
<blockquote
cite="mid:22055661.481270068809251.JavaMail.dlwillson@dlwillson-laptop"
type="cite">
<pre wrap="">Not a solution, but more information. Privilege appears to be relevant.
The "operation not permitted" message seems to be because you're not a privileged user.
Root gets "operation not supported" instead.
Regular users can add immutable, but can't remove it. :-?
$ touch test
$ ln -s test testlink
$ chattr +i test
chattr: Operation not permitted while setting flags on test
$ chattr +i testlink
chattr: Operation not supported while reading flags on testlink
$ lsattr test*
-----------------e- test
lsattr: Operation not supported While reading flags on testlink
$ sudo chattr +i test
$ sudo chattr +i testlink
chattr: Operation not supported while reading flags on testlink
$ lsattr test*
----i------------e- test
lsattr: Operation not supported While reading flags on testlink
$
David L. Willson
Trainer, Engineer, Enthusiast
MCT MSCE Network+ A+ Linux+ LPIC-1 NovellCLA UbuntuCP
tel://720.333.LANS
Freeing people from the tyranny (or whatevery) of Microsofty-ness
----- "Jim Ockers" <a class="moz-txt-link-rfc2396E" href="mailto:ockers@ockers.net"><ockers@ockers.net></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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. ( <a class="moz-txt-link-abbreviated" href="mailto:ockers@ockers.net">ockers@ockers.net</a> )
Contact info: <a class="moz-txt-link-freetext" href="http://www.ockers.ca/pason.html">http://www.ockers.ca/pason.html</a>
_______________________________________________
clue-tech mailing list
<a class="moz-txt-link-abbreviated" href="mailto:clue-tech@cluedenver.org">clue-tech@cluedenver.org</a>
<a class="moz-txt-link-freetext" href="http://cluedenver.org/mailman/listinfo/clue-tech">http://cluedenver.org/mailman/listinfo/clue-tech</a>
</pre>
</blockquote>
<pre wrap=""><!---->_______________________________________________
clue-tech mailing list
<a class="moz-txt-link-abbreviated" href="mailto:clue-tech@cluedenver.org">clue-tech@cluedenver.org</a>
<a class="moz-txt-link-freetext" href="http://cluedenver.org/mailman/listinfo/clue-tech">http://cluedenver.org/mailman/listinfo/clue-tech</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Jim Ockers, P.Eng. (<a class="moz-txt-link-abbreviated" href="mailto:ockers@ockers.net">ockers@ockers.net</a>)
Contact info: <a class="moz-txt-link-freetext" href="http://www.ockers.ca/pason.html">http://www.ockers.ca/pason.html</a>
</pre>
</body>
</html>