Server Fault is a question and answer site for system and network administrators. 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

I have a directory with log files and I'm putting logs from script launched by users into them. Logging with syslog isn't possible in this case.

I want the users to have only write permissions on log files. The problem is, that write permissions must be restricted, so that they can only append to that files. The underlying filesystem is XFS.

The following doesn't work:

# chattr +a test.log
chattr: Inappropriate ioctl for device while reading flags on test.log

Is there any other solution for this? Thank you for your hints.


The solution was:

# xfs_io
> open test.log
> chattr +a
> close
share|improve this question
Sounds like a job for access control lists (ACLs). Search for this on google or SF. – slm Dec 30 '12 at 14:59
Which version of Linux, kernel, distribution? – ewwhite Dec 30 '12 at 17:07
Already asked for deletion there. Sorry for that. – metalhead Dec 31 '12 at 9:58
up vote 3 down vote accepted

AFAIK chattr only works on ext* (ext{2,3,4}) and some other specific filesystems. The xfs_io man page does mention chattr though.

share|improve this answer
Actually, this worked out pretty well for me. Thank you. I had to open files through xfs_io and then used chattr command on them. – metalhead Dec 30 '12 at 17:30

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.