Solved

Controlling a profile's initial directory when using FTP

Posted on 2006-11-09
10
425 Views
Last Modified: 2008-01-09
A client needs to send us a file via FTP.  How do I force the user profile they will be using to a specific folder on the IFS?  Without changing directories, I think the file will be placed in QGPL.
0
Comment
Question by:roosterup
10 Comments
 
LVL 13

Expert Comment

by:samic400
ID: 17907127
Would the HOME DIRECTORY parameter on the user profile work? Haven't used it but I believe that would be where they would start for a directory.
0
 
LVL 1

Author Comment

by:roosterup
ID: 17907147
I thought that too, it didn't work.
0
 
LVL 1

Author Comment

by:roosterup
ID: 17907169
It is possible to use a cd command and change the directory, but i don't want them to do that.  It would be nice if the dir was already set.  

Limiting their access to just the desired dir would be great.
0
 
LVL 14

Accepted Solution

by:
daveslater earned 50 total points
ID: 17907254
hi
in the command CHGFTPA
you have 2 choices

 Initial directory  . . . . . . .   *CURLIB    or *HOMEDIR

you need to set it to *HOMEDIR  to use the directory in the user profile

Dave
0
 
LVL 13

Assisted Solution

by:_b_h
_b_h earned 50 total points
ID: 17907315
You can use the Change FTP Attributes (CHGFTPA) command to set the default name format and default directory.
If you set 'Initial name format' to *PATH and 'Initial directory' to *HOMEDIR:
CHGFTPA NAMEFMT(*PATH)  CURDIR(*HOMEDIR)
then the user's ftp session will start with the home directory from their user profile, BUT this change will apply to all users. You can't have some users default to the QSYS system using *CURLIB and others to *PATH.

You will also need security in place to control their activities. For example, they can change to any directory they are authorized to:
cd mydir  OR cd \qsys.lib\qgpl.lib
or they can execute commands that they are authorized to by using:
quote rcmd endsbs *all *immed

Barry
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Author Comment

by:roosterup
ID: 17907324
Thanks daveslater, i will check this out.  

i'm wondering if this would cause problems for others sending us files.  Maybe I'll have to change everyone?  
0
 
LVL 1

Author Comment

by:roosterup
ID: 17907448
If i change the CURDIR to *HOMEDIR, what do i do about those that upload to QSYS?

Could i change the home directory for those that are uploading to the QSYS system to /QSYS.LIB/QGPL.LIB/ ?
0
 
LVL 13

Expert Comment

by:_b_h
ID: 17907495
They will find the right directory, but will have to use the correct name format to transfer files, so their scripts will have to change

Barry
0
 
LVL 1

Author Comment

by:roosterup
ID: 17907574
awesome.
0
 
LVL 27

Expert Comment

by:tliotta
ID: 17911161
roosterup:

If you need individual control over the current directory for FTP, you'll need to write an exit program for the FTP server logon exit point, QIBM_QTMF_SVR_LOGON, using format TCPL0200. Not a particularly big deal; an example of a basic FTP exit program written in CL is shown at:

http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzaiq/rzaiqexamplogoncl.htm

There are examples in C and RPG also. The parent topic gives an overview that mentions the capabilities of the exit point:

http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzaiq/rzaiqlepi.htm

The links are for V5R4, but the info has hardly changed for years. All kinds of related info is in topics surrounding it.

Because this can be tailored to check for specific users (or IP addresses, etc.), it won't affect all users -- just the ones that you choose to affect.

Tom
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Large Outlook files lead to various unwanted errors and corruption issues. Furthermore, large outlook files can also make Outlook take longer to start-up, search, navigate, and shut-down. So, In this article, i will discuss a method to make your Out…
Fine Tune your automatic Updates for Ubuntu / Debian
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now