Solved

Controlling a profile's initial directory when using FTP

Posted on 2006-11-09
10
426 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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Knowing where your website is hosted is as important as the features you receive, the monthly fee, and the support you receive. Due diligence should be done when choosing your next hosting provider.
When you have clients or friends from around the world, it becomes a challenge to arrange a meeting or effectively manage your time. This is where Outlook's capability to show 2 time zones in one calendar comes in handy.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

831 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