Code:
CreateFile("C:\\quux\\bar.foo", GENERIC_READ | GENERIC_WRITE, 
        FILE_SHARE_READ, NULL, OPEN_ALWAYS, 
        FILE_ATTRIBUTE_NORMAL, NULL);
Creates ( or opens an existing ) file to read and write, and lets other applications read the file, but not write to it. Now...
Is there a way to do this in Linux??