5

Under Linux I can:

chattr +i SOMEFILE

so that even root can't modify the SOMEFILE. Are there any similar solutions for AIX?

1
1

The wikipedia page on chattr says: chattr is a command in the Linux operating system that allows a user to set certain attributes on a file residing on many Linux filesystems. chflags is the analogous command on modern BSD systems, including OS X. The commands are similar to the attrib command on DOS, OS/2 and Microsoft Windows. Other Unix systems have no analogous commands; Solaris supports extended file attributes, but there are no user level commands for setting or changing them, and the chatr command in HP-UX, and chattr in AIX have unrelated functions.

0

At first I thought that ACLs could do the job. But a quick google revealed that the owner and root can (re)set ACLs on AIX.

chattr is specific to ex3/ext3 file-systems (and thus specific to Linux) - so I would say - you need a file-system that supports this feature.

A workaround might be using an NFSv4-mount from another server. In that environment root normally is mapped to a different (not privileged) UID.

4
  • Root can reset the immutable bit on Linux too. I don't know anything about AIX ACLs, what is available that's relevant here? Jan 5 '12 at 23:31
  • extended acl's maybe can do something like the "immuntable bit/flag" under other OSes, but I don't know how. Jan 6 '12 at 14:02
  • FileSystem is JFS2 Jan 6 '12 at 14:02
  • AIX does support file immutability, but sadly not with the default jfs2/jfs filesystems. The page that Gilles linked to also mentions this partly Future release of Filesystems should help explicitly support such features Currently immutable files are only supported with GPFS, as that is more a property of the filesystem and not of the operating system, See ibm.com/developerworks/aix/library/au-gpfs/index1.html for more details on those GPFS features. I'd still like to know your use case, as even on linux immutable flag is rarely used.
    – doktor5000
    May 9 '15 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.