3

Let's say I want to set one or more attributes (in the chattr sense) on every file created in a given directory. Is there a way to achieve this automatically, like umask does for file permissions ?

In other words, is there a way to omit the chattr step in :

$ copy file /path/to/backup/
$ chattr +i /path/to/backup/file

for every file created in /path/to/backup/ ?

Note : My system is Debian and my filesystem is ext3.

1 Answer 1

2

You can run inoticoming to watch for files placed in the directory and automatically run any command, in this case chattr. (note linux specific)

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.