0

I have a specific file that an app is randomly changing and that I need to be immutable. I.e. stop the system from rewriting the file.

Considering that the NAS has BusyBox for ssh access, how can I do this?

Thank you

edit: chmod isn't not working for this

acseven
  • 43
  • 7

1 Answers1

0

You should make that file Read Only,

$ chmod 444 <file>
YBounya
  • 71
  • 3
  • Sorry, I should have mentioned that chmod wasn't cutting it. `hive> chmod 444 .ui_info hive> ls -l .ui_info -r--r--r-- 1 root root 54 Sep 24 10:19 .ui_info hive> ls -l .ui_info -r--r--r-- 1 root root 54 Sep 24 10:19 .ui_info hive> ls -l .ui_info -r--r--r-- 1 root root 54 Sep 24 10:27 .ui_info` – acseven Sep 24 '15 at 09:29
  • Ok that's interesting. How is this app accessing the file ? And also what is the file system your file is on ? – YBounya Sep 25 '15 at 00:50
  • Yeah, this is not my area of expertise... :) This is a Synology NAS (linux based with BusyBox, this I know), and it a simple text file that one of the NAS' packages creates and rewrites. – acseven Sep 25 '15 at 10:46
  • What file system is in use ? What do you see for the volume your file is on when you use the 'mount' command ? – YBounya Sep 28 '15 at 06:37
  • This is what I see : `/dev/root on / type ext4 (defaults) /sys on /sys type sysfs (0) none on /dev/pts type devpts (gid=4,mode=620) /tmp on /tmp type tmpfs (0) /run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755) /dev/shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime) none on /sys/fs/cgroup type tmpfs (uid=0,gid=0,mode=0755,size=4k) /dev/bus/usb on /proc/bus/usb type bind (bind) none on /sys/kernel/debug type debugfs (0) /dev/vg1000/lv on /volume1 type ext4 (usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,synoacl) securityfs on /sys/kernel/security type securityfs (0)`. – acseven Sep 28 '15 at 10:16