Search code examples
linuxnatty

Create limited user in linux that can only edit specific files


I am working on adding a few people to work on my site but I want them to only be able to access certain files as they are going to be working on a live site for the very first time.

I want the user to be given hand picked file access by me (the admin) and allow them to do everything but delete that file.

Is this even possible? If so how would this work? (I DID google this)


Solution

  • Put the file(s) into directory these users has only r+x access, but allow the write access on the file itself. This will prevent the file from deletion while the editing will be possible.

    As an option put the files into some directory they have no write access and then hard link the files into their home directories - they will be able to remove the files only from their home directories.