GID & UID for HP-UX ?

Hi,
can somebody tell me how to make directoriy in which all files will be generated as dir owner ?

I'm able to add GID [chmod g+s ] for directory group and files have group id like folder , but when i do same for user [ chmod u+s ] files still are created as user which creates them :frowning:

drwsrwsrwx 2 flexbul flex 96 Feb 13 13:08 /tmp/INIT

-rw-r--r-- 1 oraclef flex 0 Feb 13 13:08 test2

Thanks & Regards
Peter

There is no setting for the file's protection masks or the directory's protection mask that will do what you want.

All I can think of:
Write a simple daemon with root priv, that periocially updates file ownership of files in your directory - that do not belong to the owner of the directory.

BUT. This scheme is fraught with problems. Suppose one user has umask=077.
The user opens and writes the file. Closes file. daemon comes along and changes ownership. Now what happens? The original user can't do much with the file.

You could create a special program to create these files. The program would be suid to the user who is the desired owner of the files. Then to enforce use of this program, you could make the directory writable only by the desired owner.