File Station used for FTP transfer

Questions regarding using the Web File Manager, "File Station" and "File Browser" can be placed here
Forum rules
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:
https://myds.synology.com/support/suppo ... p?lang=enu
2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.
ChrizK
Novice
Novice
Posts: 43
Joined: Thu Feb 03, 2011 10:15 am

File Station used for FTP transfer

Postby ChrizK » Tue Aug 22, 2017 4:53 pm

Hi
I have a lot of data I would like to transfer to a disk.
Unfortunately, the only disk I have that is large enough is in a MyNet WD N900C, which means I can only access it over TCP/IP.
(I have tried removing the disk and connecting via USB, but neither the DS, or Ubuntu for that matter, recognise the partitions)

As I have a lot of data, I don't want to use a PC as a go-between. I want to select the files from DSM, and let it handle the copy process unattended.
NB I actually want to copy files from N900C to DS, clear the files on N900C, and then copy several GBs from DS to N900C.

I have found there is no FTP client on DS, but File Station appears to allow me to create a Remote Connection using FTP.
Being file station, I assume it allows me to select files once I have successfully created the connection.

I have attempted to create the FTP connection, but I repeatedly get;
Unable to connect to server. Please ensure the information entered is correct and check (as applicable) your internet, firewall, and proxy settings.
BTW I am attempting Unicode, as suggested
https://www.synology.com/en-uk/knowledg ... on/connect

I haven't setup the firewall on my DS yet, and internet connectivity is fine. Not too sure why/if a proxy is used(?)

Despite not having FTP from command line, I understand there is the option of wget;
ash-4.3# wget 192.168.0.9
--2017-08-22 16:24:50-- http://192.168.0.9/
Connecting to 192.168.0.9:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified
Saving to: 'index.html'

'connected' indicates that there is no connectivity problem, at least, over http.

Does anybody have any thoughts what I can check/try?

Many thanks
ChrizK
Novice
Novice
Posts: 43
Joined: Thu Feb 03, 2011 10:15 am

Re: File Station used for FTP transfer

Postby ChrizK » Tue Aug 22, 2017 7:03 pm

Update with messages log entries

2017-08-22T18:57:16+01:00 My_NAS synoscgi_SYNO.FileStation.VFS.Connection_1_create[21408]: mount.cpp:256 Unable to access ftp://admin@192.168.0.9
2017-08-22T18:57:16+01:00 My_NAS synoscgi_SYNO.FileStation.VFS.Connection_1_create[21408]: mount.cpp:257 Error: [0, 24], Socket I/O timed out
2017-08-22T18:57:16+01:00 My_NAS synoscgi_SYNO.FileStation.VFS.Connection_1_create[21408]: mount.cpp:420 Fail to mount, error = 6
2017-08-22T18:57:22+01:00 My_NAS synoscgi_SYNO.FileStation.VFS.Connection_1_create[21382]: server.cpp:186 Mount failed, uid=1024, mode=1, code=6
2017-08-22T18:57:24+01:00 My_NAS synoscgi_SYNO.FileStation.VFS.Connection_1_create[21382]: SYNO.FileStation.VFS.cpp:160 Failed to connect, err: 6
User avatar
Rusty1281
Seeker
Seeker
Posts: 1622
Joined: Fri Jun 03, 2011 10:51 pm

Re: File Station used for FTP transfer

Postby Rusty1281 » Tue Aug 22, 2017 8:25 pm

Just to be clear. Your WD is local just like your Syno is right? If so, who is the server and who is the client here? If you are using FS FTP feature (client) that means that you need to have ftp running on your WD side. Have you setup this? If so on what port are you running? Are there any firewall setting on either of the NAS devices or on your local network (any other firewall solutions)?

What you need to make sure 1st that you have network visibility on ftp port from your syno to your WD and a user account to do it. FTP default port is 21 so make sure that you have communication from your syno to wd on that port and that wd actually has ftp server running on its end.
Synology DS412+ (4x3TB WD red - RAID 5) | Synology DS211j (2x2TB WD green - RAID1) | RT1900AC
ChrizK
Novice
Novice
Posts: 43
Joined: Thu Feb 03, 2011 10:15 am

Re: File Station used for FTP transfer

Postby ChrizK » Tue Aug 22, 2017 11:32 pm

Thanks again Rusty1281

You prompted me to try something.

WD had FTP enabled, but it was accessible as a public share.
I had already been successful reaching it from my laptop, but when I added a password, it failed.
At this point, I chose 'admin' as the user. I made up a new user and password, and it was successful.
(Perhaps admin is reserved, or has a conflict?)

I now have
ftp://N900C@192.168.0.9/
under FTP within File Station.

My new problem is, there isn't anything being displayed.

If I use a windows browser or explorer, I am presented with the initial folder, being Public, and I can open it to locate my folders and files.

If I change the File Station navigation bar to
ftp://N900C@192.168.0.9/Public
I get a message saying the "Destination Folder does not exist"

One step forward....
Any thoughts?
User avatar
Rusty1281
Seeker
Seeker
Posts: 1622
Joined: Fri Jun 03, 2011 10:51 pm

Re: File Station used for FTP transfer

Postby Rusty1281 » Wed Aug 23, 2017 9:22 am

So N900C account has permissions on that Public folder? What happens if you create a new separate folder on WD in FTP root (and give that account permissions)? Can you browse then?

Also that Public folder is it Public or public (small P)? That will make a difference on linux os. This now comes down to the fact that Syno can't see that Public folder in the specific path for some reason. Are you sure that the path is ftp root/Public? Or is Public folder in some other subfolder 1st?

Log onto your WD and use ssh or something else to confirm the full path for your Public folder (or any other folder in FTP root).
Synology DS412+ (4x3TB WD red - RAID 5) | Synology DS211j (2x2TB WD green - RAID1) | RT1900AC
ChrizK
Novice
Novice
Posts: 43
Joined: Thu Feb 03, 2011 10:15 am

Re: File Station used for FTP transfer

Postby ChrizK » Wed Aug 23, 2017 11:24 am

Great advice, thanks

After finding the 'hidden' admin page .php, I have been able to turn on SSH.
NOTE: SSH uses a different username/password
You are correct, that Public isn't the first folder off root.

I have tried the following from File Station (see below for the reasons for different attempts);
ftp://N900C@192.168.0.9 (no content)
ftp://N900C@192.168.0.9/shares (The destination folder does not exist)
ftp://N900C@192.168.0.9/shares/Public (The destination folder does not exist)
ftp://N900C@192.168.0.9/internalhd/root (The destination folder does not exist)
ftp://N900C@192.168.0.9/var/tmp/storage/Public (The destination folder does not exist)

If you can be bothered reading through my attempts on the command line (see last command line listing), you will see I have created;
/shares/seeme
/shares/Public/seeme2
I have changed permissions to 777, and also ownership to N900C

Each step, I have hit refresh in File Station (while viewing ftp://N900C@192.168.0.9), and have not been able to see either folder.

Also, I have tried to create a folder from File Station, and I get the following error;
Error occurred on ftp://N900C@192.168.0.9/SeeMe3 (This action is not supported and therefore cannot be completed.)
I am not permitted to use '/' when creating a directory, so I cannot attempt /Public/SeeMe3

NOTE, I can create a folder using N900C in Windows FTP, but only under Public (no permission to write in higher folder)
I cannot see 'winsee' from File Station, which makes me believe I am 'stuck' in 'shares'

ftp> cd ..
250 OK. Current directory is /
ftp> mkdir winsee
553 (This probably means "Permission denied")
ftp> cd Public
250 OK. Current directory is /Public
ftp> mkdir winsee
257 "winsee" : The directory was successfully created

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
WD folders using SSH
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# pwd
/
# ls -la
drwxr-xr-x 15 root root 255 Apr 12 2013 .
drwxr-xr-x 15 root root 255 Apr 12 2013 ..
drwxr-xr-x 2 root root 670 Apr 12 2013 bin
drwxrwxrwt 6 root root 11980 May 1 2012 dev
drwxr-xr-x 19 root root 589 Apr 12 2013 etc
lrwxrwxrwx 1 root root 9 Apr 12 2013 home -> /var/home
drwxr-xr-x 12 root root 245 Apr 12 2013 htdocs
drwxr-xr-x 5 root root 49 Apr 12 2013 internalhd
drwxr-xr-x 7 root root 1701 Apr 12 2013 lib
drwxr-xr-x 2 root root 3 Apr 12 2013 mnt
dr-xr-xr-x 125 root root 0 Jan 1 1970 proc
drwxr-xr-x 2 root root 467 Apr 12 2013 sbin
lrwxrwxrwx 1 root root 16 Apr 12 2013 shares -> /internalhd/root
drwxr-xr-x 11 root root 0 Jan 1 1970 sys
lrwxrwxrwx 1 root root 8 Apr 12 2013 tmp -> /var/tmp
drwxr-xr-x 4 root root 89 Apr 12 2013 usr
drwxr-xr-x 15 root root 0 Aug 23 11:14 var
drwxr-xr-x 2 root root 50 Apr 12 2013 www
# cd shares
# ls -la
drwxr-xr-x 6 nobody nobody 4096 May 1 2012 .
drwxr-xr-x 5 root root 49 Apr 12 2013 ..
drwxr-sr-x 2 root 1001 4096 May 1 2012 .mediacrawler
-rw-r--r-- 1 root root 4 Sep 20 2013 HD_upgrade_end
-rw-r--r-- 1 root 1001 6 Sep 20 2013 HD_upgrade_start
-rw-r--r-- 1 nobody nobody 30 Apr 12 2013 OrionInfo.txt
lrwxrwxrwx 1 root root 23 May 1 2012 Public -> /var/tmp/storage/Public
drwxr-xr-x 3 nobody nobody 4096 Sep 20 2013 etc
-rwxr-xr-x 1 nobody nobody 540 Apr 12 2013 oreset.sh
-rwxr-xr-x 1 nobody nobody 857 Apr 12 2013 rotatelog.sh
drwxr-xr-x 9 nobody nobody 4096 Sep 20 2013 usr
drwxr-xr-x 3 nobody nobody 4096 Sep 20 2013 var

However, if I use Windows to FTP, my initial folder is shares.
I am able to cd to Public from here, see below.
(Could the change of ports be relevant?)


---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Windows FTP
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

ftp
ftp> open 192.168.0.9
Connected to 192.168.0.9.
220---------- Welcome to Pure-FTPd ----------
220-You are user number 1 of 10 allowed.
220-Local time is now 11:06. Server port: 21.
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 5 minutes of inactivity.
200 OK, UTF-8 enabled
User (192.168.0.9:(none)): N900C
331 User N900C OK. Password required
Password:
230 OK. Current restricted directory is /
ftp> ls
200 PORT command successful
150 Connecting to port 30680
Public
226 1 matches total
ftp: 11 bytes received in 0.00Seconds 11000.00Kbytes/sec.
ftp> cd Public
250 OK. Current directory is /Public
ftp> ls
200 PORT command successful
150 Connecting to port 30681
Shared Music
Shared Pictures
Shared Videos
Software
Studio 1555
old Video
226 6 matches total
ftp: 83 bytes received in 0.00Seconds 83000.00Kbytes/sec.
ftp> quit
221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
221 Logout.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Creating directories, changing permissions and ownership
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# pwd
/shares
# ls
HD_upgrade_end OrionInfo.txt etc rotatelog.sh var
HD_upgrade_start Public oreset.sh usr
# mkdir seeme
# ls -l seeme
# stat seeme
File: 'seeme'
Size: 4096 Blocks: 0 IO Block: 4096 directory
Device: 801h/2049d Inode: 47043 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2017-08-23 11:26:54.000000000
Modify: 2017-08-23 11:26:54.000000000
Change: 2017-08-23 11:26:54.000000000
# su N900C
-sh: su: not found
# sudo su N900C
-sh: sudo: not found
# pwd
/shares
# ls
HD_upgrade_end OrionInfo.txt etc rotatelog.sh usr
HD_upgrade_start Public oreset.sh seeme var
# chmod -R 777 seeme
# cd Public
# mkdir seeme2
# chmod -R 777 seeme2
# stat seeme
stat: can't stat 'seeme': No such file or directory
# ls
Shared Music Shared Videos Studio 1555 seeme2
Shared Pictures Software old Video
# stat seeme2
File: 'seeme2'
Size: 0 Blocks: 0 IO Block: 4096 directory
Device: 806h/2054d Inode: 81338 Links: 1
Access: (0777/drwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2017-08-23 11:32:45.000000000
Modify: 2017-08-23 11:32:45.000000000
Change: 2017-08-23 11:32:55.000000000
# chown -R N900C:N900C seeme2
# stat seeme2
File: 'seeme2'
Size: 0 Blocks: 0 IO Block: 4096 directory
Device: 806h/2054d Inode: 81338 Links: 1
Access: (0777/drwxrwxrwx) Uid: ( 2002/ N900C) Gid: ( 2002/ N900C)
Access: 2017-08-23 11:32:45.000000000
Modify: 2017-08-23 11:32:45.000000000
Change: 2017-08-23 11:34:31.000000000
# cd ..
# chown -R N900C:N900C seeme
# stat seeme
File: 'seeme'
Size: 4096 Blocks: 0 IO Block: 4096 directory
Device: 801h/2049d Inode: 47043 Links: 2
Access: (0777/drwxrwxrwx) Uid: ( 2002/ N900C) Gid: ( 2002/ N900C)
Access: 2017-08-23 11:26:54.000000000
Modify: 2017-08-23 11:26:54.000000000
Change: 2017-08-23 11:35:04.000000000
User avatar
Rusty1281
Seeker
Seeker
Posts: 1622
Joined: Fri Jun 03, 2011 10:51 pm

Re: File Station used for FTP transfer

Postby Rusty1281 » Wed Aug 23, 2017 12:57 pm

Ok so N900C account has ftp permissions and by default Public folder is the destination that FTP users land to. So from WD side I would say that all is well. Account, communication, folders etc...

The fact still remains that when you connect to your FTP you get no content (via FS). Personally I connect this way:

ftp://N900C@192.168.0.9

After that depending on the permissions of the user I have logged on I see the content needed. If your connections is successful but you see no data then there is still permissions problem on folder lvl. If you can't even connect, well then I guess you know what the problem is.

One last question what happens if you connect to your WD as root account using the above connection string?
Synology DS412+ (4x3TB WD red - RAID 5) | Synology DS211j (2x2TB WD green - RAID1) | RT1900AC
ChrizK
Novice
Novice
Posts: 43
Joined: Thu Feb 03, 2011 10:15 am

Re: File Station used for FTP transfer

Postby ChrizK » Fri Aug 25, 2017 12:24 pm

As ever, thanks Rusty1281

You have given me enough pointers to work this out.

My previous comment was unclear
ChrizK wrote:If I use a windows browser or explorer, I am presented with the initial folder, being Public, and I can open it to locate my folders and files.

what I meant, was that when I connect using Windows, I immediately 'see' Public (as a share), ie I am a 'level' above.

I checked /etc/passwd;
N900C:x:2002:2002:Linux User,,,:/tmp/ftp_share:/bin/sh
As you can see, it is using another directory, containing a link for 'Public'

# cd /tmp/ftp_share/
# ls -ltr
lrwxrwxrwx 1 root root 23 Aug 22 23:18 Public -> /var/tmp/storage/Public
(the path being one that I attempted to use in FS previously)

usermod was not found (no idea what the root password is, but the SSH user has fairly good privileges).
I suspect it is against Linux principles, but I directly changed passwd using vi;
N900C:x:2002:2002:Linux User,,,:/tmp/ftp_share/Public:/bin/sh

Great, I can now see the folders in File Station :-)

Odd that FS wouldn't let me do this from the navigation bar (ftp://N900C@192.168.0.9/Public).

Is it something to do with permissions (to /tmp/ftp_share), which I haven't been able to 'get my head around'?
(I find it odd that I can access /var/tmp/storage/Public using /tmp/ftp_share/Public (link), but not if I attempt to go direct to /var/tmp/storage/Public. Ultimately it is the same place.)

When I saw "Public" using Windows, I think I must have been accessing a public share without a password, which allows me to 'create' at this level.
Using FTP (and FTP user), I cannot create at this level. I have to open an existing folder, and can create from there (same when using Windows ftp://192.168.0.9).
This is fine for my purposes.

Hopefully this thread will help others, as I have seen some (old/unanswered) posts about this subject.

{Maybe someone can comment why I had to explicitly change my FTP home to Public rather than see/select it in FS}

Once again, thank you
User avatar
Rusty1281
Seeker
Seeker
Posts: 1622
Joined: Fri Jun 03, 2011 10:51 pm

Re: File Station used for FTP transfer

Postby Rusty1281 » Fri Aug 25, 2017 12:35 pm

ChrizK, glad you managed to figure this out and got it to work in the end.
Synology DS412+ (4x3TB WD red - RAID 5) | Synology DS211j (2x2TB WD green - RAID1) | RT1900AC

Return to “File Station”

Who is online

Users browsing this forum: No registered users and 1 guest