I am getting some strange messages when I have an interactive user try to use SFTP:
Connecting to azmvs...
sftp> ls
tsftp.aje72sh.test tsftp.ecom.comm.sales
sftp> ls /+
Couldn't stat remote file: No such file or directory
Can't ls: "/+" not found
sftp> ls /+mode=text
Couldn't stat remote file: No such file or directory
Can't ls: "/+mode=text" not found
sftp> ls /+mode=text,lrecl=80,recfm=fb,space=cyl.2.5
Couldn't stat remote file: No such file or directory
Can't ls: "/+mode=text,lrecl=80,recfm=fb,space=cyl.2.5" not found
sftp> put comm.sales.txt //TSFTP.ECOM.COMM.SALES
Uploading comm.sales.txt to //TSFTP.ECOM.COMM.SALES
Couldn't get handle: Permission denied
Whenever I try and do an ls /+, I get an error stating it "Can't ls: "/+" not found.
Am I missing a PATH statement to my /usr/lpp/coz/bin somewhere?
Interactive using ls /+ command
Re: Interactive using ls /+ command
If you're sure that Co:Z is installed on your z/OS system, and other userids are able to use Co:Z SFTP, the most likely culprit is that you don't have an sftp-server.rc file in your $HOME/.ssh directory. Co:Z looks for this file, and if it isn't found, it will fall back to the ported tools version of sftp.
Note that this file must be executable (chmod +x $HOME/.ssh/sftp-server.rc)
Here's the relevant section of the documentation: http://www.dovetail.com/docs/sftp/confi ... fig_server
Note that this file must be executable (chmod +x $HOME/.ssh/sftp-server.rc)
Here's the relevant section of the documentation: http://www.dovetail.com/docs/sftp/confi ... fig_server
Re: Interactive using ls /+ command
Each user does not have their own in their $HOME/.ssh directory.
We took the other route and put in in the /SYSTEM/etc/ssh directory.
Here is an ls -l of that directory:
[AZMVS]:/SYSTEM/etc/ssh: >ls -l
total 464
-rwxr-xr-x 1 AIA02DM 1 1612 Jul 26 13:53 cozsftp_config
-rwxr-xr-x 1 AIA02DM 1 1563 Jul 26 13:54 cozsftp_server_config
-rw-r--r-- 1 AIA02DM 1 126379 Jan 10 2012 moduli
-rwx------ 1 AIA02DM 1 331 Mar 13 13:17 sftp-server.rc
We took the other route and put in in the /SYSTEM/etc/ssh directory.
Here is an ls -l of that directory:
[AZMVS]:/SYSTEM/etc/ssh: >ls -l
total 464
-rwxr-xr-x 1 AIA02DM 1 1612 Jul 26 13:53 cozsftp_config
-rwxr-xr-x 1 AIA02DM 1 1563 Jul 26 13:54 cozsftp_server_config
-rw-r--r-- 1 AIA02DM 1 126379 Jan 10 2012 moduli
-rwx------ 1 AIA02DM 1 331 Mar 13 13:17 sftp-server.rc
Re: Interactive using ls /+ command
Turns out to be a permissions problem.
If you look at my previous post you will see the file in question:
-rwx------ 1 AIA02DM 1 331 Mar 13 13:17 sftp-server.rc
So, I did a chmod with a +x and it changed it to:
-rwx--x--x 1 AIA02DM 1 331 Mar 13 13:17 sftp-server.rc
Then it stopped it from working from anyone and started getting "connection refused".
So, I did a chmod to make it 755 (which is the same as the /SYSTEM/etc).
-rwxr-xr-x 1 AIA02DM 1 331 Mar 13 13:17 sftp-server.rc
It is now working correctly.
If you look at my previous post you will see the file in question:
-rwx------ 1 AIA02DM 1 331 Mar 13 13:17 sftp-server.rc
So, I did a chmod with a +x and it changed it to:
-rwx--x--x 1 AIA02DM 1 331 Mar 13 13:17 sftp-server.rc
Then it stopped it from working from anyone and started getting "connection refused".
So, I did a chmod to make it 755 (which is the same as the /SYSTEM/etc).
-rwxr-xr-x 1 AIA02DM 1 331 Mar 13 13:17 sftp-server.rc
It is now working correctly.