How to protect root-owned files in the Desktop directory of a user
by VP_Chestnut from LinuxQuestions.org on (#57KVC)
On a client machine, the Desktop directory of a user has the following rights :
Code:drwxr--r--. 3 user user 4096 1 sept. 12:41 DesktopInside this directory there are some root-owned launchers :
Code:-rwxr-xr-x. 1 root root 218 10 aout 11:56 launcher.desktopThe user can delete these launchers, as they are located in the user-owned directory Desktop with the 744 rights.
Is there a way to prevent the user from deleting these root-owned files ?
But the user must keep the right to add files in his Desktop directory : so I suppose I need the 'w' right in the Desktop directory, but this right implies that the user can delete all files inside... I don't know if there is a way to work around this.


Code:drwxr--r--. 3 user user 4096 1 sept. 12:41 DesktopInside this directory there are some root-owned launchers :
Code:-rwxr-xr-x. 1 root root 218 10 aout 11:56 launcher.desktopThe user can delete these launchers, as they are located in the user-owned directory Desktop with the 744 rights.
Is there a way to prevent the user from deleting these root-owned files ?
But the user must keep the right to add files in his Desktop directory : so I suppose I need the 'w' right in the Desktop directory, but this right implies that the user can delete all files inside... I don't know if there is a way to work around this.