Re: Report - saving into file
Posted in 1991
>>I am generating reports from INFORMIX/4GL ans saving into file called inv.out. >>This file is under /u/ruchi/billing.report. The group has permission to rwx >>to a subdirectory billing.report. When A user creates >>inv.out to generate report then he can use the same file over and over again >>to generate the diffrent reports. But the problem is that when B user generates >>report then he can not the use the file inv.out to generate report. How could I >>give access so all users in the group can use the inv.out file? >> >>Any help would be greatly appreciated. >> >>Thanks. Ruchi. >> > >Ruchi - > > Write a C function to call chmod() and fix the permissions > on the file. Link the C function into your 4GL program, and > call it after your 4GL report program creates the file. > A simpler answer is to write a shell script along the lines of: #!/bin/sh umask 0660 your_4gl_app This will have your_4gl_app create it's files with the group write permission turned on. Then anyone in the same group will be able to overwrite the file. If people in different groups need to be able to write the file, change the ``umask 0660'' to ``umask 0666''. Hope this helps, jeffl ---- Jeffrey F. Lawhorn Information Systems Group Programming Manager Unix, C, and Database Consulting jfl0@isg.com 450 B Street 16th Floor sdsu!isg100!jfl0 San Diego, CA 92101 (619) 234-3405 x274