Operating System - HP-UX
1832694 Members
3345 Online
110043 Solutions
New Discussion

Problems at the SAM: Executing Custom Application

 
Roy Cox
Occasional Contributor

Problems at the SAM: Executing Custom Application

I have a custom application in SAM that it executes a process 'X' where the owner is sybase (In the sam's option "execute using" the user is sybase). The results of this process X generates files but the owner of this files is root.
The problem is that i need that the owner of this files will be sybase, because i have problems of privilegies at the files.
6 REPLIES 6
Chris Watkins_1
Respected Contributor

Re: Problems at the SAM: Executing Custom Application

Add code to chown/chmod the files as needed after completion?

Not without 2 backups and an Ignite image!
Chris Watkins_1
Respected Contributor

Re: Problems at the SAM: Executing Custom Application

I will note that I created a simple command to create files
in my tmp directory, using "Execute using specific user id"
as you've said you have it... and it did create them as
the proper user/group. Are you sure the application you're
calling isn't suid root for some reason or other?

Just curious.
Not without 2 backups and an Ignite image!
Michael Schulte zur Sur
Honored Contributor

Re: Problems at the SAM: Executing Custom Application

Hi,

adding chown probably wont do you any good, since the process ist run as sybase and cant change ownership of the log. Ist the name of the log always the same? If so, you might create it ahead with owner sybase. Are you talking about a script? If so, run the script as root and make a su - sybase within the script and start the process x.

greetings,

Michael
SAM 11iV3 Team
New Member

Re: Problems at the SAM: Executing Custom Application

Use the option "Execute using specified user id" and select sybase as the user.

The purpose of
"Execute using user's Id" and "Execute using specified user's id" are different.

Execute using user's Id option is useful for restricted SAM. SAM will launch the custom application with the id of the user who started SAM. The user id is not related to the owner of the application. You can create a custom application, the launch restricted sam (using sam -r) and enable access to the custom application to certain users (say sybase_user1).

This is not what you want in your case. You always want the application to run as sybase.
Your problem can be solved by using the "Execute using specified user id" option.You can enable restricted access to this area, but now no matter who invoked the application, it is always run as sybase.

Hope this helps...
Michael Schulte zur Sur
Honored Contributor

Re: Problems at the SAM: Executing Custom Application

Hi Roy,

are you still with us?

greetings,

Michael
Roy Cox
Occasional Contributor

Re: Problems at the SAM: Executing Custom Application

Thanks.
i was analizing the case and i can see all recomendations that you do. So, finally the problem was because the permission and owner of the files binaries that was executing for the root. This files was with stiky bit.