Unix: Prevent delete on a user file from a user

2015-04-11T18:31:45

[UNIX] Assume that there exists a user X (i.e. not a superuser), which belongs to a group G. This user X creates a file F in a directory, with permissions "rw-rw----". Is there a way to prevent delete on this file from any user (except superusers), with a command issued by user X?
I found "chattr +a", but it can only be issued by superuser.

In other words, I am user X, member of group G, I own a file which must have permissions "rw-rw----". I want to prevent this file from deletion by myself and any other user of group G.

Copyright License:
Author:「edoedoedo」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/29576849/unix-prevent-delete-on-a-user-file-from-a-user

About “Unix: Prevent delete on a user file from a user” questions

[UNIX] Assume that there exists a user X (i.e. not a superuser), which belongs to a group G. This user X creates a file F in a directory, with permissions "rw-rw----". Is there a way to prevent del...
Is it possible on Linux or MacOSX to prevent a Unix domain socket file (e.g. in /tmp) that is currently bound from being deleted? I want a mode 0777 socket that users can connect to but that users ...
If I open a website with firebase installed and i execute this firebase.auth().currentUser.delete() in browser console after a user has logged in, the current user will be deleted. How can i preve...
Protecting workbook structure will prevent a user from deleting sheets. But how could I (using VBA) prevent a user from deleting a particular sheet I designate? I've seen examples where an active s...
Protecting workbook structure will prevent a user from deleting sheets. But how could I (using VBA) prevent a user from deleting a particular sheet I designate? I've seen examples where an active s...
I see that in Firebase deleting a user is very easy, but in my case I would like to prevent its cancellation so that the user can delete only his data in the database. Why? Because if I maintain h...
I have a situation like : - User A post a Web Content 1---> Get Approved to show it on the page - By default, user A can delete Web Content 1 (status is Aprroved or not) How can i prevent user A so
I have a file and want to delete lines when user enters an ID in UNIX/Vi. The file is called 'users' and contains: 001:joe:one:20:01:02 002:joe:two:21:06:02 003:joe:three:22:05:02 004:joe:four:2...
How to prevent all detailView show data from another user ?? For example, this happens when you type an product ID of another user in the URL. The detailView shows the details of the product norma...
When users log in, their name is displayed in the statusbar in the mainform of the application : StatusBar1.Panels[1].Text:= DataModule1.ADQuery4.FieldByName('USER').AsString; However, this ...

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.