I want to set up a 'file sharing' area on my server machine where two users can both easily read and write files. I want this to be an NFS mount on both users' machines so it's just an 'ordinary' directory as they see at and it can also be mounted as a VirtualBox shared drive.
Ideally I'd like the shared area to be owned by a third user, i.e. the two users reading and writing files are, say, 'fred' and 'bert' while the shared area is owned by 'shared'.
Is there any way to set up NFS so that if fred writes a file to the area owned by 'shared' it automatically becomes owned by shared and similarly for bert? I don't really want to end up with shared's files owned by all sorts of different users.
It would be fairly trivial to set up the shared area to have general write permissions for everyone but it would still be only too easy for either fred or bert to write files there that wouldn't then be writeable by the other users.
I guess I essentially want both fred and bert to become user shared when they do anything in shared's file system.