Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Controlling a profile's initial directory when using FTP

Posted on 2006-11-09
10
Medium Priority
?
444 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 14

Accepted Solution

by:
daveslater earned 200 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 200 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

If you’re involved with your company’s wide area network (WAN), you’ve probably heard about SD-WANs. They’re the “boy wonder” of networking, ostensibly allowing companies to replace expensive MPLS lines with low-cost Internet access. But, are they …
Read on to get a few ideas on how to promote your next corporate event.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

721 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