2

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.

Update:

The solution was:

# xfs_io
> open test.log
> chattr +a
> close
metalhead
  • 23
  • 4

1 Answers1

2

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 '12 at 17:30