× 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.



Yes, but there's no need to add a jobscde.  You can do it with the SBMJOB
command:

SBMJOB CMD(CHGOWN OBJ('/newfolder') NEWOWN(QMSF) RVKOLDAUT(*NO))
USER(ALLAUTH)

You can't use QSECOFR in this case - you'll need to use a non-system profile
that has sufficient authority.

There is a risk here:  Who ever has authority to the sbmjob command and to
the user profile in USER can also submit other commands to batch using the
authority of the user in USER.  That could be a bad thing depending on your
environment.  This is especially important when using QSECOFR.  I wouldn't
do that.  I would look at creating a user profile that has the least amount
of authority to do the job.

Phil


> -----Original Message-----
> From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]On
> Behalf Of Ted Barry
> Sent: Friday, January 18, 2002 6:15 PM
> To: rpg400-l@midrange.com
> Subject: RE: CHGOWN Problem
>
>
> I think this will work:
>
> 12600-
> 12700- /* _______________________________________________________
> 12800- /* |  Change ownership of newly created directory to QMSF.
> 12900- /* _______________________________________________________
> 13000-           ADDJOBSCDE JOB(CHGOWN) CMD(CHGOWN OBJ(&USRDIR) +
> 13100                  NEWOWN(QMSF) RVKOLDAUT(*NO)) FRQ(*ONCE) +
> 13200                  JOBQ(QSYSNOMAX) USER(QSECOFR) MSGQ(*NONE) +
> 13300                  TEXT('Change Ownership of User Directory')
> 13400-                     MONMSG     MSGID(CPF0000)
>
> >>> sublime78ska@yahoo.com 01/18/02 02:39PM >>>
> Yes, submit the job under a different user profile (USER parm).  The user
> will still need authority to that user profile but for that you could use
> adopted authority.  There are also a couple api's that you can use to swap
> profiles so you can add the authority and then swap back.  I've never used
> them but there are references to them in the archives.
>
> Phil
>
> > -----Original Message-----
> > From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]On
> > Behalf Of Ted Barry
> > Sent: Friday, January 18, 2002 5:24 PM
> > To: rpg400-l@midrange.com
> > Subject: RE: CHGOWN Problem
> >
> >
> > There's got to be a workaround.
> >
> > >>> joepluta@PlutaBrothers.com 01/18/02 02:26PM >>>
> > I seem to remember somebody saying that adopted authority
> doesn't work in
> > the4 IFS.  I could be mistaken.
> >
> > > From: Ted Barry
> > >
> > > I've got a program that checks the existence of a subdirectory
> > > based on the user id.  If it doesn't exist, the program creates
> > > the directory (CRTDIR) and then does a CHGOWN to ensure QMSF is
> > > the owner...only...IT DOESN'T WORK.
> > >
> > > I compiled it as QSECOFR *OWNER so that users would be able to do
> > > this.  Does anyone know of a way to get it to work?
> >
> > _______________________________________________
> > This is the RPG programming on the AS400 / iSeries (RPG400-L)
> mailing list
> > To post a message email: RPG400-L@midrange.com
> > To subscribe, unsubscribe, or change list options,
> > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> > or email: RPG400-L-request@midrange.com
> > Before posting, please take a moment to review the archives
> > at http://archive.midrange.com/rpg400-l.
> >
> >
> > _______________________________________________
> > This is the RPG programming on the AS400 / iSeries (RPG400-L)
> mailing list
> > To post a message email: RPG400-L@midrange.com
> > To subscribe, unsubscribe, or change list options,
> > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> > or email: RPG400-L-request@midrange.com
> > Before posting, please take a moment to review the archives
> > at http://archive.midrange.com/rpg400-l.
> >
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.