0

I'm trying to setup a folder so that users can only create or modify files/folders in it, but not delete them. I tried the 'chattr +a' command and got different results in RHEL5.8 and RHEL6.5 respectively. I tried the following command:

# chattr +a /home/share

In RHEL5.8, the 'append' attribute is automatically set for newly created files/folders under /home/share folder, which is what I want. But it is not the case in RHEL6.5, that cause users can still remove files/folders under sub-folfers of /home/share. For example:

$ mkdir /home/share/test-folder
$ touch /home/share/test-folder/test-file
$ rm /home/share/test-folder/test-file

The file 'test-file' still can be removed.

So my question is, in RHEL6.5, how can I get the same result as what I got in RHEL5.8? or is there other solutions?

Thanks.

Eric Zhang
  • 11
  • 3
  • Please note that Stackoverflow is for programming questions only. Not general computing issues. You may want to try over at [Unix SE](http://unix.stackexchange.com/). – kaylum Feb 24 '16 at 11:05
  • Sorry, I didn't noticed that. Thank you for your remind. – Eric Zhang Feb 25 '16 at 03:59

0 Answers0