I have a directory with log files and I'm putting logs from script launched by users into them. Logging with syslog doesn't seem possible in this case. (non-daemon rsync)
I want the users to have only write permissions on log files. The problem is, that write permissions must be further restricted, so that users (script) 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.
chattr +a
works for me here (3.2 kernel). Note that you need to be root to usechattr
(a$
prompt suggests non-superuser), though you'd get a different error message ifchattr +a
was supported and you were not root. – Stéphane Chazelas Dec 30 '12 at 22:02