× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi, James:

The RTVUSRPRF command (or equivalent QSYRUSRI API) will give you the UID and GID values for a specified user profile.

You can also use QWTSETP (set profile handle) and QSYGETPH (get profile handle) to swap to the profile you want to own the IFS files, before your program creates them. This technique avoids having to use chown (or equivalent) after the fact. If your application ships with or installs an application owning profile, you could change to that profile, so that all IFS files created by this application are owned by that profile.

Mark S. Waterbury

> On 10/12/2010 6:28 PM, James H. H. Lampert wrote:
Dennis Lovelady wrote:
See chown.
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=%2Fapi
s%2Fchown.htm
HMMMMmmmmmmm....... And available all the way back to V4R2. Maybe
further than that.

And it looks like "fchown()" might be an even better fit. Thanks.

Does anybody have any experience with chown() and fchown()?

It looks like it wants numbers for the user and group IDs. How do I get
these numbers? (May I assume that "QUSER" is guaranteed to map to some
fixed number across all systems?)

Speaking of which, what's this about IFS objects having a primary group?
I thought only users could have group IDs.

--
JHHL

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.