Access linux server file system directly from Windows for development
I am developing for an Arch linux server and I am looking for software to reduce the time it takes to copy the project to the server every time I changed something from my windows machine.
I tried FileZilla and copied my project on the server, but that is annoying and takes time.
I also tried a program that mounted the directory so I had access to it from a windows folder via sftp which is extremely slow but suits my needs.
Is there any other way to save my file on the windows machine and have the saved file on the linux machine within at most a second?
Clouds take so much time to sync or I didn't set them up properly. Any recommendations?
73 Answers
Use Samba on the Linux server.
Samba uses the SMB protocol, just the same that Windows uses to share directories in a network.
So, the server can publish a shared directory that you will mount on your windows machine as a shared drive just like this tutorial shows.
I would suggest rsync, because it can only move changed / new files. But you're doing development. Oh please, just use a git repository on both dev host and server, then pull the changes.
2Personally I'm using Mountain Duck (Shareware) for this purpose. It allows me to mount a sftp share on Windows, but since you have already tested that and the speed does not seem sufficient for you the only other option I see is to install the samba server and share you development folder using a CIFS share which you can directly access from Windows (\\server\folder).
For Arch linux the steps seem to be:
- Install the package with pacman:
sudo pacman -S samba - Copy the example configuration file:
sudo cp /etc/samba/smb.conf.default /etc/samba/smb.conf Set up the samba share: edit
/etc/samba/smb.confand add:[MyFolder] path = /path/to/folder inherit permissions = yes inherit owner = yesCheck the configuration file for syntax errors:
testparm- set the samba password:
sudo smbpasswd some_user(that user should have access to the folder of course) - Restart the service to apply new changes:
sudo systemctl restart smbd nmbd