permissions on created file when using the I/O adapter

When using the operation File Write within the I/O adapter on a Unix machine, is there a way to specify the file permissions for this file.

Currently when the file is created then I must go into the Unix environment and chmod the specific files. Is there an automatic way to accomplish this?

Thanks in advance for your answer.

-Michael E. Engelby
Gelco Information Network

By default the IO adapter writes the file out with user permissoins of rw and no permissions for the group or others. To fix this, you can modify the adaptermonitor script and change the ‘umask’ command appropriately.

Modify:
${ACTIVE_HOME}/bin/adaptermonitor script.

Originally, it came set to as follows:

umask=0077

(The last three bits are important. i.e, the 077)

What this does is as follows: files created by any succeeding child
processes spawned off would have the permissions as follows:

700
user: Read/Write/Execute
group: No Read/No Write/No Execute
others: No Read/No Write/No Execute

You will need to modify the ${ACTIVE_HOME}/bin/adaptermonitor on every system
running it to:

umask=0007

This changed the permissions of files created as follows:

770
user: Read/Write/Execute
group: Read/Write/Execute
others: No Read/No Write/No Execute

You can write your own java code to call system command to do chmod for you such as.

Runtime rt = Runtime.getRuntime();
String cmd = "chmod o+rw "+ filename;
Process p = rt.exec(cmd);