Prevent rename or deletion of file in AIX

Dell Dell optiplex 755 desktop desktop c...
September 2, 2010 at 07:15:46
Specs: AIX 5.3, 4GB RAM

I am working on AIX 5.3 and I have a file called auto.cpy in the directory /page/oe. The file is currently owned by ops:page and I would like to change to change the ownership to src:page. What I would like to achieve is no one except the src user should be able to rename or delete the file.

Please note that the users from the page group has write permissions on the /page/oe directory.

I changed the ownership to src:page and the permissions to 744, but I am (bna:page) able to rename this file since I have a write permission on the directory /page/oe.

Can some one help how to achieve this?


See More: Prevent rename or deletion of file in AIX

September 3, 2010 at 01:36:27
set the sticky bit for that file, e.g.chmod 4711 auto.cpy

Report •

September 27, 2010 at 22:00:46
Make yourself the owner of the directory or something like bin:bin (as is the /tmp directory).

Note that the permissions on the /tmp directory are drwxrwxrwt. This is set by chmod 7777 so simply:

chmod 7777 /page/oe

Now, any files created in that directory can only be deleted by the person who created them. If you make yourself the owner, you'll be able to delete any files in that directory. If you make the owner bin:bin, then only the user that created the file or user bin can remove files from that directory.

Report •
Related Solutions

Ask Question