[Top] [All Lists]

Re: "xfs_io -c chattr +i " on a symlink

To: Dan Am <xfs@xxxxxxxx>
Subject: Re: "xfs_io -c chattr +i " on a symlink
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Thu, 03 Aug 2006 09:13:07 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <28749.>
References: <28749.>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Thunderbird (Macintosh/20060719)
Dan Am wrote:
(resend, since I used the wrong account to send the initial mail, sorry)

Dear list,

I am trying to make a symlink immutable with chattr, however the command
seems to follow the link, which point to a NFS Mount.
Setting xattr works on symlink btw, which is useful.
More data below
Any ideas ?

Best Regards

Heres the situation from my machine's view:
/data > ls -l bin
lrwxrwxrwx  1 root root 48 Aug  2 15:53 bin -> /archive/l01abnfs07/bin

/data> xfs_io  -c "chattr +i" bin
xfs_io: specified file ["bin"] is not on an XFS filesystem

~ > xfs_io -V
xfs_io version 2.8.4

Try just using chattr.

[sandeen@sandeen ~]$ ln -s /tmp tmplink
[sandeen@sandeen ~]$ ls -l tmplink
lrwxrwxrwx  1 sandeen sandeen 4 Aug  3 09:05 tmplink -> /tmp
[sandeen@sandeen ~]$ su
[root@sandeen sandeen]# chattr +i tmplink
[root@sandeen sandeen]# stat -f tmplink
  File: "tmplink"
    ID: 802      Namelen: 255     Type: XFS (0x58465342)
Blocks: Total: 23377204   Free: 8557099    Available: 8557099    Size: 4096
Inodes: Total: 93554496   Free: 93202008
[root@sandeen sandeen]#
[root@sandeen sandeen]# lsattr tmplink
----i-------- tmplink

xfs_io also has an option to try to do operations even on non-xfs filesystems, if that helps... if it follows the link & sets the attr on the link target, that may not be behaving as expected though.


<Prev in Thread] Current Thread [Next in Thread>