Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FTP quote command

510 views
Skip to first unread message

Mehrzad Irani

unread,
Feb 27, 2013, 4:08:44 AM2/27/13
to
I am trying to automate something in Python, and I require to connect to a NonStop server via ftp.

The issue I face is this:
Everytime I sign into ftp (via python or via cmd prompt) I always login default to either guardian/osh environment (which one is unpredictable), and I can change between the two using "quote" command - which is all fine and good.

But, when I want to issue the command from python (via ftpObject.sendcmd('quote guadian') I get a response code of 500 (command not understood):

ftplib.error_perm: 500 'QUOTE guardian': command not understood

Is there a way for me to control where ftp signs in?

roberto....@gmail.com

unread,
Feb 27, 2013, 6:54:04 AM2/27/13
to
Mehrzad,
It depends on the safeguard-settings of your logon-id (user or alias) where you end up - in Guardian or OSS. Check the output of SAFECOM INFO USER xxx:
INITIAL-PROGTYPE = PROGRAM
INITIAL-PROGRAM =
INITIAL-DIRECTORY = /users/NL19796
When the INITIAL-DIRECTORY has been set, you get OSS, else Guardian.

And for the QUOTE-command: leave out the 'quote ' itself, just send 'OSS' or 'GUARDIAN'.

rOBERTO

wbreidbach

unread,
Feb 27, 2013, 9:22:46 AM2/27/13
to
Besides the Safeguard configuration there is another possibility if you are using native Guardian users, this does not work for aliases.
If you want the native user to get a Guardian prompt you can change the portconf file of the related LISTNER process:

ftp $system.ztcpip.ftpserv UEXT 2000,2000,200 GUARDIAN 1

You need to restart the LISTNER afterwards.
The UEXT parameter increases the default file size and GUARDIAN 1 causes an implicite "Quote Guardian".
If you are within OSS you can transfer to Guardian subvols as well:
put abc /G/system/work/abc. This works fine for binary transfers, for ASCII you would get a code 180 file which could be converted to a 101 file by using CTOEDIT.

Joachim Schmitz

unread,
Feb 27, 2013, 4:39:46 PM2/27/13
to
You're not by chance using anonymous ftp here? Then 'qoute' won't work.

Bye, Jojo

Mehrzad Irani

unread,
Feb 28, 2013, 4:38:12 AM2/28/13
to
Thank you. The removing of quote in sendcmd was helpful. It works.
0 new messages