Let's say that we have this situation:
-rwxrwx-r- 1 user1 mygroup 0 Sep 12 16:53 testfile
A group of developers are working on the same VM (Linux). I need to simulate the concept of checkout/checkin. If a user checks out a file no one should be able to write in it until he checks it in.
I tried changing file owner; each time a user wants to checkout he becomes the file owner and prevents other from writing to it and then checks in by changing the file owner to the default and sets back permissions on the file to the default. This means I'll need chown
and chmod
but these commands require sudo
and I can't give sudo
permission to developers.
Can I give a user the possibility to chown
and chmod
only a specific file?