2

I am trying to mount folder using the FTP protocol on my Synology.
What I managed to do so far is to use the option mount remote folder of the file station, but you can only mount folders with CIFS protocol, not FTP.

Basically, I want to work on my computer on a website sources through my NAS. Is this even possible ?

Edit :

Actually I'm working in a company that is the provider, We have an old stable server that only provides ftp access. I wanted to mount a folder as FTP just like with nautilus under ubuntu, but on synology, in order to have multiple developers working on the same sources. That's not really convenient but I can't use a versionning system on this server either.

Brewal
  • 129
  • 1
  • 1
  • 4
  • 1
    If FTP is your only option, this is a very poor choice when access by multiple people is needed. There is no locking, so even if you got this to work they would end up clobbering each other's files and you would lose data regularly. Don't do this. – Michael Hampton Feb 18 '14 at 13:55
  • That's what I thought (even if we are actually 3 workers on). I will try to put a git repository on another private server and auto deploy on this old server... – Brewal Feb 18 '14 at 14:07
  • CIFS or NFS would work fine. Is there some reason you don't want to use either of those? – Michael Hampton Feb 18 '14 at 14:20
  • I tried with CIFS but I've got this error : `Failed to connect to the remote directory. Make sure the remote server is accessible via CIFS protocol`. I guess that it is not. – Brewal Feb 18 '14 at 14:31
  • Well, did you make sure that the NAS is accessible via CIFS? – Michael Hampton Feb 18 '14 at 14:32
  • I don't want to access the NAS via CIFS, I want the NAS to access a remote web server (under freebsd) – Brewal Feb 18 '14 at 14:37

2 Answers2

2

As of DSM 6.1, in File Station, you can connect to FTP Server: ->File Station - Tools -Remote Connection - Connection Setup

Then choose FTP and just follow the 'Remote Connection setup Wizard'.

Pascal
  • 123
  • 6
0

More detail would be helpful. Is this a website running on the NAS or is this a remote webserver that the NAS is mounting over ftp to? ie. you push files to the NAS and they get pushed up to webserver?

I'm guessing the latter and if that's the case, synology's UI does not have this option. There's no 'ftp' client on the command line either.

Check with your website provider, is ftp the only option? if SSH/SFTP is open you could potentially rsync the files over ssh from synology.

ie. https://www.digitalocean.com/community/articles/how-to-copy-files-with-rsync-over-ssh

Edit - Thanks for clarifying.

As Michael Hampton has said, ftp is very poor for file locking. So with these restrictions in mind.

  1. Define a share on Synology that is staging area for publishing from. Don't edit from the staging area, do that elsewhere, ideally in a version control tool, then checkout to staging.
  2. Install python on synology. In the web gui python 2.7 is available to install from the package manager.
  3. In command line of NAS, deploy the python based ftp script in this other answer https://stackoverflow.com/a/5664673/998808 - Its well documented with parameters for walking the filesystem and remote directory.
  4. Optional - Setup Cron to execute the script at particular times (say overnight) Instructions for cron on synology can be found here. http://jimmybonney.com/articles/manage_crontab_synology/

Note - for some reason all cron tasks in synology are executed as root, so when deploying the script you can put it pretty much anywhere but i'd suggest creating an upload user on the NAS and keep the ftp script in it's homedir. That way the script can be edited without dropping into the command line.

Edit X2 - As you've mentioned setting up GIT on another box, i'll point out that a GIT server is an available package on synology and there's various articles on post-commit scripts. This means you could do better than step 4 above by defining a GIT server that calls the python script post-commit and automagically updates the files across the webserver. Sorry i haven't more detail on this. I've not gone down the line of installing git on synology yet.

Michael Henry
  • 577
  • 3
  • 9
  • You are guessing right, but I can't use SSH (see my edit). I guess that I'll have to find another way to make team work... – Brewal Feb 18 '14 at 13:49