I am working on Ubuntu 12.04 LTS and 10.04 LTS platforms and I am having a problem with QDir::mkPath. I am trying to create a path using mkPath, lets say /john/play/games and then copy a file game.htm to the /home/john/play. After I copy the file I set the permissions on the file to rwxr - - r - -. So that 3rd party applications can read the file game.htm. But the directories /john, /john/play and /john/play/games are created with permissions drwxr - x - - - due to which other applications and other users are not able to read the file game.htm.
I have also observed in a different application that the same QDir::mkpath creates the dir with drwxr - xr - x . I want to understand with what permissions does QDir::mkpath creates the directories and how to control or set the permissions.