Accessing FTP from AIX on Synology (broken)
#1
Accessing FTP from AIX on Synology (broken)
As previously discussed, NFS support on the Synologies is broken (for AIX or Linux or any UNIX) so using FTP/SFTP on your synology to access files is a far superior method.
Synology has a pretty good article on setting up FTP/SFTP on the device so I won't bother mentioning any of that: https://www.synology.com/en-global/knowl...AS_via_FTP

Load up your AIX korn terminal and bang in:
# ftp 1.1.1.1

*replace 1.1.1.1 with the IP address of your synology

It'll prompt you for your username and password (this will be specific to the synology accounts, so you know, the same account you use to log into the synology's web interface).

Then you can type 'ls' to list the files, and 'cd' to change the directory to whatever folder in the structure you like. What's being shown in the FTP being served is the folder structure on the synology's file manager. So let's say I had a folder called AIX where I copied everything, it would go like this:
ftp> ls
200 PORT command successful
150 Opening BINARY mode data connection for 'file list'.
AIX
226 Transfer complete.
ftp> cd AIX
250 CWD command successful.

Now because this is old UNIX it's a very picky and strange FTP client. If you try to use 'get' (individual file transfer), you'll end up with:
Cannot write to a directory
(I've not been able to figure out why I keep getting "Cannot write to a directory" with AIX 7.1, other people have had it work fine, but for my purposes I'm just going to not use the get command).

Next up we have 'mget' (get transfers individual files, and mget transfers multiple files), you will most likely run into this if you attempt to copy a folder structure:
550 XYZ/ABC: not a plain file.

Pack up whatever you need into a big daddy tar on a Linux machine ($ tar -cvf filenamehere.tar.gz foldernamehere) and then copy the tar.gz onto the Synology. Then back on AIX's ftp commandline run the mget command and copy it to your local disk:
ftp> mget filenamehere.tar.gz
200 PORT command successful.
150 Opening BINARY mode data connection for 'filenamehere.tar.gz' (123456789 bytes).
226 Transfer complete.
123456789 bytes received in 0.00123 seconds (1.1 Kbytes/s)
local: filenamehere.tar.gz remote: filenamehere.tar.gz

Note: I was unable to get the destination syntax functioning for some reason, it ignored whatever I put and always repeated remote as the local filename... so just using mget with the filename and nothing else--and that will plop it right in the root of the disk. That's fine though since it's just one file, you can then later move it to a subfolder.

Then type in "quit" to leave the terminal FTP client. change into the directory where you dragged the bigdaddy tar and un-tar it (# tar -xvf filername.tar.gz).

Note #2: I was actually unable to properly untar my bigdaddy tar for some reason the code I got didn't exist anywhere on the internet), but for the most part people said the reason why this happens is when there are long file names, and AIX's native TAR cannot handle it.
*shrug*

It's still able to transfer files in for me regardless so ymmv. It should also be possible to set up CIFS/SMB, so if I am so inclined I may figure that out some time and write about it.

"Unlike Windows, OS/2 is a true operating system" - Steven S. Ross, How to Maximize Your PC
(This post was last modified: 07-06-2020, 03:36 PM by micrex22.)
micrex22
PS/2 it!

Trade Count: (0)
Posts: 144
Threads: 27
Joined: May 2018
Find Reply
07-05-2020, 11:40 AM
#2
RE: Accessing FTP on Synology from AIX
(07-05-2020, 11:40 AM)micrex22 Wrote:  As previously discussed, NFS support on the Synologies is broken ....

We had one, but it was about ten years ago, but I could also use wget -r if I wanted to do entire directories recursively (from Irix, even !) and also, sometimes wanted to see a more static file list, and found that ftp://ip-address in a browser was useful. Use the normal rmb-choose "download file" from the popup and voila, here she comes !

More than one way to skin a cat Cool
hamei
broke-down old clunker

Trade Count: (0)
Posts: 380
Threads: 3
Joined: Jul 2019
Location: 上海
Find Reply
07-05-2020, 01:49 PM
#3
RE: Accessing FTP on Synology from AIX
(07-05-2020, 01:49 PM)hamei Wrote:  
(07-05-2020, 11:40 AM)micrex22 Wrote:  As previously discussed, NFS support on the Synologies is broken ....

We had one, but it was about ten years ago, but I could also use wget -r if I wanted to do entire directories recursively (from Irix, even !) and also, sometimes wanted to see a more static file list, and found that ftp://ip-address in a browser was useful. Use the normal rmb-choose "download file" from the popup and voila, here she comes !

More than one way to skin a cat Cool
The issue is with a fresh install of AIX, especially AIX 7.1 in this case -- you get no pre-bundled browser or anything (and even if you did install Firefox from the AIX firefox CD that can be used to kickstart it to be preinstalled which is only supported on 5.3 and 6.1, it would deploy conflicting packages that don't work with Perzl's packages and can't easily be properly uninstalled without a fresh install of AIX all over again).

So your options are limited with how you can move files onto the operating system. I mean once some applications are finally installed then it's a lot easier.

"Unlike Windows, OS/2 is a true operating system" - Steven S. Ross, How to Maximize Your PC
(This post was last modified: 07-05-2020, 01:58 PM by micrex22.)
micrex22
PS/2 it!

Trade Count: (0)
Posts: 144
Threads: 27
Joined: May 2018
Find Reply
07-05-2020, 01:58 PM
#4
RE: Accessing FTP on Synology from AIX
Just want to provide an update that I found better methods of using the FTP client -- however that's all moot because the AIX FTP corrupts the files when it copies them from the synology!!! I've confirmed they are set to binary mode so I have no idea why... file size seems to be okay so your guess is as good as mine.

Ergo FTP on AIX doesn't seem to be a viable option with the synology as well, now we're down two so next up adventures with SMB/CIFS on AIX :0)

"Unlike Windows, OS/2 is a true operating system" - Steven S. Ross, How to Maximize Your PC
micrex22
PS/2 it!

Trade Count: (0)
Posts: 144
Threads: 27
Joined: May 2018
Find Reply
07-06-2020, 05:38 AM


Forum Jump:


Users browsing this thread: 1 Guest(s)