Or have a function specifically for unix permissions, like int unix(int r, int w, int x, int gr, int gw, int gx, int ur, int uw, int ux); It might be even more readable.