Solved

Controlling a profile's initial directory when using FTP

Posted on 2006-11-09
10
424 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
A Short Story about the Best File Recovery Software – Acronis True Image 2017
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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