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

1 Answer 1


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

  • 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, 2012 at 17:30

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.