I want to make a file immutable. So, I installed the chattr package.
root@MrGhosh:/home/public# chattr +i /home/public/.profile
chattr: Not a tty while reading flags on /home/public/.profile
But I am getting an error: chattr: Not a tty while reading flags. I found a similar ticket at dd-wrt. (https://svn.dd-wrt.com//ticket/3890) posted 4 years ago with no reply.
Is this because of the filesystem? What filesystem does OpenWRT use? I have read that chattr doesn't support all file systems.
I am using GL-inet AR150 firmware which is built on top of OpenWRT 18. Except for some extra vendor specific packages, it is same as OpenWRT.
The attributes chattr and lsattr manipulate were originally specific to the Second Extended Filesystem family (ext2, ext3, ext4), and are available as part of the e2fsprogspackage.
However, the functionality has since been extended, fully or partially, to many other systems, including XFS, ReiserFS, JFS and OCFS2. The btrfs file system includes the attribute functionality, including C which turns off the copy-on-write built in feature of btrfs due to slower performance associated with CoW.