Set permissions for new files created by application

Hello All,
I have an application that creates the log files and they created with 600 permissions instead of 644(default). How can I set the permissions so that files can be created with 644. I looked into the /etc/profile for the umask settings and it is set 002(if UID>199). And when I type umask I get "0022". Also permissions are resetting to 600 on log rotation if I change the permission to 644 manually.
I just tried, when I login with root and create file manually, it creates with 644. Could some one help me out. I wanted to create the files with 644 and shouldn't change. Thanks.

If your umask is set to 022 and files you create are being set to mode 644, then the application you're calling either sets a different umask before creating files or chmod()'s permissions on the files after it creates them. To change this, you'll have to change the application.

Thanks for your response Don, As I'm not sure if I could change the application, is there any other way that I can setup so that files can be created with 644. Thanks.

Not really, no. You can't force the FS to use different permissions than what the application is asking for.

What is your application?

thats custom java application.
so the only way is to have cron job to run every 5mins or so??
Thanks

If you know the name of the file that the application will create, you could move the application to an alternative location and replace it by a script that will call the moved application and then change the mode of the file it creates. (This probably only works if the name of the file to be created is passed to the application as one of its operands.)