Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Under Linux I can:

chattr +i SOMEFILE

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

share|improve this question
According to this IBM article on AIX V6.1 security features, there is support for immutable files. I don't know how it's done. – Gilles Jan 5 '12 at 23:30

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.

share|improve this answer

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.

share|improve this answer
Root can reset the immutable bit on Linux too. I don't know anything about AIX ACLs, what is available that's relevant here? – Gilles 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. – LanceBaynes Jan 6 '12 at 14:02
FileSystem is JFS2 – LanceBaynes 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 posting your answer, you agree to the privacy policy and terms of service.

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