int f = open( filename, O_RDONLY );
fchmod( f, permissions );
chmod( filename, permission );
Can you guess what situations the latter handles that the open()/fchmod() combination does not?
A Unix domain socket appears in the file system (under Linux, at least) and you can perform a chmod() it, but you can't open() it.