× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Re: WordPress and FTPing to and from it.

BaJohn
Virtuoso

WordPress and FTPing to and from it.

Using Windows 10 and CoreFTP, having setup FTP on my ReadyNAS RN516.

 

Running CoreFTP (as the ReadyNAS admin user) it seems to connect okay but does not show any files whatsoever at the other end.

The user/pasword does not fail and everthing looks good ... just no access on the far end.

Probably a permissions problem, but Core is using admin and all data on the readynas should be admin owned.

Any help appreciated?

 

I have looked and most posts on this in the system seem closed as no response ... hope that's not a bad sign.


RN516 (6x4TB RAID10 using WD Red Disks) :- R8500, WN2500RP and A7000
Windows 10 pro (64bit):- Intel i7 with 16GB memory .......:D
Message 1 of 12

Accepted Solutions
StephenB
Guru

Re: WordPress and FTPing to and from it.

If you only want FTP on the local LAN then there is no need to figure out what masquerading does.  But I'll tell you anyway Smiley Surprised

 

With passive mode FTP, the server sends the client the IP address and port numbers for the data connections.  If the NAS has a public internet address, then that is fine.  But when your FTP server is behind a NAT, then your client can't use the local IP address over the internet.  Instead it needs to use the public IP address of the NAS router.

 

There are two solutions - one in the client, and one in the server.  

 

Some clients detect that the IP address isn't routable (e.g., is 192.168.xxx.xxx or one of the other private address spaces), and simply substitute the public address of the control connection.  Basically they ignore the IP address they get from the server, and only use the port number.  FileZilla does that (so I don't need masquerading in the server).

 

The server solution is simply to sent the router IP instead of the local LAN IP.  That's what masquerading does.  You enter a DNS name or IP address, and it uses that instead of the local LAN address.

 

 

 

 


@BaJohn wrote:

 

My goal is to FTP to the WordPress folder /apps/wordpress/web/wp-content/  to easily upload and change items in WordPress on the NAS.

How do I arrange a share that covers that folder?


 The best way is to create a wordpress share on the NAS, and copy the /apps/wordpress/web/wp-content/ contents to it.  Then create a symlink in /apps/wordpress/web/ called wp-content that points to the new share (deleting the wp-content folder).

 

Then you have all the normal access controls on the folder.

View solution in original post

Message 10 of 12

All Replies
StephenB
Guru

Re: WordPress and FTPing to and from it.

Did you try filezilla (just to try to rule out coreftp itself)?

 

Are you running over the internet, or on your local lan?  Not forwarding passive ports will make it impossible for the FTP client to see the folders (the login succeeds, but the data commands all fail).

Message 2 of 12
BaJohn
Virtuoso

Re: WordPress and FTPing to and from it.

Re StepheB's

"Did you try filezilla (just to try to rule out coreftp itself)?

 

Are you running over the internet, or on your local lan?  Not forwarding passive ports will make it impossible for the FTP client to see the folders (the login succeeds, but the data commands all fail)."

 

Never used filezilla, as I have been using CoreFTP for many years and trust it.

I am running (this particular FTP) over the local LAN, so expect it to be easier than the Internet:)

Was the bit about forwarding passive ports to do with loacl LAN. More info please.

 


RN516 (6x4TB RAID10 using WD Red Disks) :- R8500, WN2500RP and A7000
Windows 10 pro (64bit):- Intel i7 with 16GB memory .......:D
Message 3 of 12
StephenB
Guru

Re: WordPress and FTPing to and from it.


@BaJohn wrote:

 

Was the bit about forwarding passive ports to do with loacl LAN. More info please.

 


No, the passive port forwarding is needed for NAT traversal when you are accessing over the internet. 

 

In "active mode" FTP (the original protocol), the client establishes a control connection to the server.  Then the server establishes data connections back to the client.  That fails if the client is behind a firewall (because the user of the client generally can't open ports in the firewall of whatever local router/proxy they are using - think starbucks...)

 

So "passive mode" FTP was invented.  The client establishes both the control connection to the server and the data connections to the server.  All port forwarding then is shifted to the server, where there is an administrator who can set that up.  To get it to work, you need to select a smaller passive port range in the NAS, and forward that range of ports in the router.  There is also a related setting for "masquerading" (which honestly is needed because the passive mode protocol was mis-designed).  Some clients can work around that flaw (filezilla is one, I don't know about coreftp).

 

 

If the connection itself succeeds, but folder listings and data transfers fail, then it is often because the data connections are failing.

Message 4 of 12
BrianL2
NETGEAR Employee Retired

Re: WordPress and FTPing to and from it.

Hi BaJohn,

 

Just tested this with the following settings (port forwarded 21 in my firewall) and it worked fine.

 

 

 

Hope this helps!
 

 

Kind regards,

 

BrianL
NETGEAR Community Team

Message 5 of 12
StephenB
Guru

Re: WordPress and FTPing to and from it.

If the goal is over-the-internet access, then I'd suggest a much smaller range of passive ports, within the range 49152-65535.  49152 is the lowest port number reserved for private use.  I find that 4 passive ports are enough for a single user connection.  If your client allows for multiple data connections, make sure that you have it configured as <= the number of ports you have forwarded.

 

Some clients don't need masquerading (Brian's didn't if his configuration worked through a NAT).  If you don't need it, then leave the setting alone.  If you do, then set masquerade to match your ddns address.

Message 6 of 12
BaJohn
Virtuoso

Re: WordPress and FTPing to and from it.

Hi BrainL and StephenB

 

I will have another go later today .....

 

Most of my FTP's are Internet use and this is the first time I have had a problem, over the LAN:)

Between the 2 of you I am confused over what the 'masqerading' does.

I have not used it so far, but will do so, BUT what do I put in there, as I have seen on other sites they seem to put any old rubbish in there as if it doesn't matter.

That is why I didn't use it (default not used anyway) before. If you can put rubbish in ther, why would it make a difference?


RN516 (6x4TB RAID10 using WD Red Disks) :- R8500, WN2500RP and A7000
Windows 10 pro (64bit):- Intel i7 with 16GB memory .......:D
Message 7 of 12
BaJohn
Virtuoso

Re: WordPress and FTPing to and from it.

Hi BrianL

 

I've just realized I cannot find the second 'page' shown in your post.

The one with:-

Documents, Properties, Network Access and File access.

 

Where is that found on the NAS?

 


RN516 (6x4TB RAID10 using WD Red Disks) :- R8500, WN2500RP and A7000
Windows 10 pro (64bit):- Intel i7 with 16GB memory .......:D
Message 8 of 12
BaJohn
Virtuoso

Re: WordPress and FTPing to and from it.


@BaJohn wrote:

Hi BrianL

 

I've just realized I cannot find the second 'page' shown in your post.

The one with:-

Documents, Properties, Network Access and File access.

 

Where is that found on the NAS?

 


Aarrgghhh - found it - The "documents" is the name of a share. Not been here for a long while.

 

My goal is to FTP to the WordPress folder /apps/wordpress/web/wp-content/  to easily upload and change items in WordPress on the NAS.

How do I arrange a share that covers that folder?


RN516 (6x4TB RAID10 using WD Red Disks) :- R8500, WN2500RP and A7000
Windows 10 pro (64bit):- Intel i7 with 16GB memory .......:D
Message 9 of 12
StephenB
Guru

Re: WordPress and FTPing to and from it.

If you only want FTP on the local LAN then there is no need to figure out what masquerading does.  But I'll tell you anyway Smiley Surprised

 

With passive mode FTP, the server sends the client the IP address and port numbers for the data connections.  If the NAS has a public internet address, then that is fine.  But when your FTP server is behind a NAT, then your client can't use the local IP address over the internet.  Instead it needs to use the public IP address of the NAS router.

 

There are two solutions - one in the client, and one in the server.  

 

Some clients detect that the IP address isn't routable (e.g., is 192.168.xxx.xxx or one of the other private address spaces), and simply substitute the public address of the control connection.  Basically they ignore the IP address they get from the server, and only use the port number.  FileZilla does that (so I don't need masquerading in the server).

 

The server solution is simply to sent the router IP instead of the local LAN IP.  That's what masquerading does.  You enter a DNS name or IP address, and it uses that instead of the local LAN address.

 

 

 

 


@BaJohn wrote:

 

My goal is to FTP to the WordPress folder /apps/wordpress/web/wp-content/  to easily upload and change items in WordPress on the NAS.

How do I arrange a share that covers that folder?


 The best way is to create a wordpress share on the NAS, and copy the /apps/wordpress/web/wp-content/ contents to it.  Then create a symlink in /apps/wordpress/web/ called wp-content that points to the new share (deleting the wp-content folder).

 

Then you have all the normal access controls on the folder.

Message 10 of 12
BaJohn
Virtuoso

Re: WordPress and FTPing to and from it.


@StephenB wrote:

 


@BaJohn wrote:

 

My goal is to FTP to the WordPress folder /apps/wordpress/web/wp-content/  to easily upload and change items in WordPress on the NAS.

How do I arrange a share that covers that folder?


 The best way is to create a wordpress share on the NAS, and copy the /apps/wordpress/web/wp-content/ contents to it.  Then create a symlink in /apps/wordpress/web/ called wp-content that points to the new share (deleting the wp-content folder).

 

Then you have all the normal access controls on the folder.


What a stonking idea ........why didn't I think of that ............Thanks


RN516 (6x4TB RAID10 using WD Red Disks) :- R8500, WN2500RP and A7000
Windows 10 pro (64bit):- Intel i7 with 16GB memory .......:D
Message 11 of 12
BaJohn
Virtuoso

Re: WordPress and FTPing to and from it.


@BaJohn wrote:

@StephenB wrote:

 


@BaJohn wrote:

 

My goal is to FTP to the WordPress folder /apps/wordpress/web/wp-content/  to easily upload and change items in WordPress on the NAS.

How do I arrange a share that covers that folder?


 The best way is to create a wordpress share on the NAS, and copy the /apps/wordpress/web/wp-content/ contents to it.  Then create a symlink in /apps/wordpress/web/ called wp-content that points to the new share (deleting the wp-content folder).

 

Then you have all the normal access controls on the folder.


What a stonking idea ........why didn't I think of that ............Thanks


In trying to implement this I have come across the following problem.

I would like to have all the 'wp-content' directories and files owned by 'admin' in group 'admin.

The 'wp-content' directory itself is find as this was created by admin using the "New Shares" functionality and ownership changed to admin from the GUI.

In copying (as root via SSH) all the new sub-directories and files are all owned by root.

 

Trying to 'su - admin' does NOT work.

Trying 'sudo -u admin' with copy command does NOT work.

 

Decided to do the copy as root then use 'chown -R admin:admin wp-content' to correct the ownership.

Thought it was worth indicating the problem ....

Obviously the savvy Unix person will not not even blink at it, but us old timers need a guiding hand,

and maybe this will nugget will help someone else.


RN516 (6x4TB RAID10 using WD Red Disks) :- R8500, WN2500RP and A7000
Windows 10 pro (64bit):- Intel i7 with 16GB memory .......:D
Message 12 of 12
Top Contributors
Discussion stats
  • 11 replies
  • 4721 views
  • 2 kudos
  • 3 in conversation
Announcements