Archive

Posts Tagged ‘ftp’

Sudo apt-get install basic-linux-pt3 –Install & Setup

February 18th, 2017 No comments

It’s been a busy little while, so I haven’t had time to get this written up. So lets see what I can still remember.

Installing Ubuntu Server was as easy as you’d expect. Booting into it wasn’t. Turns out that the BIOS on this box is setup not to boot from the ODD SATA port. It’ll boot from any of the four drives, or from USB; but not from that extra SATA port. My friend’s, who already has the box running, solution was to setup a RAID, where the ODD SATA is RAID number 0, which then allows it to be booted from. I went for a much simpler solution, after noticing that the install process lets you select the location of the GRUB loader. This server has a USB port and a MicroSD card reader inside the case, both bootable. I have plenty of spare MicroSD cards lying around (seriously, since when is 1GB or 2GB big enough for anybody?), so I just inserted one, and reinstalled specifying the MicroSD card as the location for the GRUB.

It felt good to have my new box booting up and actually running. I got its static IP and OpenSSH setup, checked I could access it through Putty, and finally got it up on the shelf and off my desk. Everything from this point on I’ve done in Putty, with no monitor attached to the server. Lets face it, its not like there’s any difference between one white-on-black text interface and another.

Next, I turned my attention to mounting my drives. The mount command is simple enough, but obviously I want my drives to be available right away after boot; so it was time to learn about ‘fstab’ and ‘UUID’s. Luckily this is a fairly straightforward process, especially since my drives only have a single partition on each, other than having to write down the long UUID to copy from the terminal output to the fstab file. I haven’t been able to work with copy & paste in PuTTY. One thing I started to realise at this point is that while Ubuntu boots nice and quickly, the server itself doesn’t.  So each time I want to see if my fiddling has worked, I pretty much have time to make a cup of tea. From looking through various guides etc. I simply used:

UUID=<UUID> /mnt/<mountpoint> ext4 defaults 0 2

for each of my additional drives. After a reboot, I had access to all of my files and media as it was on my old NAS. I spent a little time clearing out the directory structures it had left behind, program files etc. to leave a nice, clean access to all of my files.

NFS and Samba were just as easy to get set up as they had been on the virtual machines. Although with so many different things I wanted to share, I had to add a lot of different entries into each file.  Thankfully there’s no need to reboot after each edit, the services can simply be restarted to pick up the new settings. Samba is simple enough to test, since I’m managing the server over SSH on PuTTY in Windows. NFS required me to test in one of the VMs 0nce again; but after some work, both seemed to be working. I’m not 100% happy with some of my setup, since I’m just allowing open access to anyone on some of these shares. Chances are I’ll be fine, but I’ll want to come back at some point to try and tighten up my user management.

Emby server has a very good set of installation instructions. The main new part for me was adding the new repository, but this means it’ll be kept up to date when I perform other apt-get upgrades. Everything else related to Emby is managed through its web GUI, so straight forward stuff.

In fact, I was surprised at how simple it was to get the majority of things working. FTP just kinda worked, I just needed to make symlinks from my home directory to the other places I need to access. Even Transmission wasn’t too bad to get going and allow my remote GUI to connect. Ont thing that started to get harder from this point was keeping track of the different ports and services I was using. I took some time to make a list of computers and services to plan my external port mapping, and got things like FTP, SSH and Transmission forwarded. Internally I’ve just used the defaults for simplicity; externally I’ve made sure they’re set to something completely different.

Next Up:

Bash-ing things around

This post was originally published on Nathanael’s site here.

Categories: Nathanael Y, Ubuntu Tags: , , , , , , ,

Sudo apt-get install basic-linux-pt2 –Testing-&-VMs

February 17th, 2017 No comments

With the hardware sorted (bar some jiggery-pokery to get the ODD to SSD bay converter to fit properly), I set about deciding what I want this box to do.

The list I came up with looks like this:

  • Media serving to my Kodi devices (2 Raspberry Pi systems, my android tablet, and a new Ubuntu PC I’m putting together for retro gaming with my kids)
  • FTP – I like to use my NAS like my own personal cloud. My tablet can mount an FTP in its file browser just like any other folder. No sFTP support, though, unfortunately (and I don’t like any of the file browsers I tried which do).
  • Transmission (or Deluge) – the main reason for swapping the 4GB of RAM out for 16GB
  • SSH (obviously!)
  • Dropbox and Google Drive – for when various apps and things integrate well with these mobile apps.
  • Backup – the WD My Cloud EX4’s backup options are very poor.
  • General file sharing with Windows and Ubuntu – Samba & NFS, naturally.
  • Hosting & tinkering with other bits I might want to try & learn about – a website (for practise, not for public viewing), a git… who knows.

Being basically completely unfamiliar with most of this stuff, I was undecided between Ubuntu Desktop or Server for quite a while. Desktop obviously just has so much of this stuff already ready to go, it mounts things automatically, I can use the GUI as a fallback if something isn’t right, its just more like what I’m accustomed to. On the other hand, having the GUI running all the time will just use up unnecessary RAM  – granted I probably don’t have a shortage of that, but still…

In the end I installed both onto VMs on my Windows machine, made copies (so I had a clean version always ready to go without having to reinstall again), and started playing.

First up I wanted to sort how I was going to deal with my media backend. On my current setup I use the Kodi client on one of my PCs to manage a central SQL database. While it works, its a bit slow and rather inneficient, so I went looking for either a headless Kodi backend, or just a way to run it without the GUI. I found all sorts of ideas, builds and code , none of which I understand or feel like I could implement. After a discussion with a linux guru (one of my Uni lecturers) it was clear that my plan was probably not going to work; he had pointed out that he just runs his on DLNA, and that Plex seems to be quite good too. More research, and a question in /r/Kodi later, I had been pointed in the direction of Emby, a backend for Kodi without many of the limitations of Plex and DLNA. Installation was simple enough, but accessing the Web UI wasn’t. When I had setup the VMs I had just left their network settings as NAT; this, it turns out, makes accessing the network from the VM possible, but not accessing the VM from elsewhere on the network (includingother VMs on the same system). I did try to just change the settings in the VM to add a bridged adapter, but it didn’t work. Not knowing enough about networking on linux to fix this, I just went ahead and reinstalled, this time setting up the VM with two network adapters – one NAT and another bridged. This worked a treat, and after adding a few media files and installing Kodi on the Desktop VM, I was able to play videos no problem.

Next, for no particular reason, was getting NFS working. I found guides, forums, blogs etc (my Google-fu is pretty strong) and set about trying. I was sure it should be working, I’d installed nfs-kernel-server, added the entry into /etc/exports, setup the permissions, but I just couldn’t mount it in the Desktop VM – even though I could watch them through Kodi. I ended up having to ask Reddit’s linux4noobs sub. Simple answer… sudo /etc/init.d/nfs-kernel-server start … and instantly it mounted no problem. Turns out that Kodi was actually watching a transcoded stream from Emby, until I had NFS working. Thankfully Samba took less time and hassle to get working (surprisingly), and pretty soon I could access files across both linux and Windows. And there was much rejoycing.

At this point I was getting impatient (plus this microserver is taking up a chunk of space on my desk where I really ought to be doing uni work), so I quickly checked I knew how to setup a static IP, and turned my attention to the real thing.

Next Up:

Booting up The Box
Installing, reinstalling and shenanigans

This post was originally published on Nathanael’s site here.

Why Linux is great for web development

November 27th, 2009 1 comment

Linux is great for web development, but not necessarily for the obvious reasons. The reason I find developing websites and server programs much better on a Linux machine than on a Windows machine is as simple as the following three letters SSH.

SSH stands for Secure SHell and is a way to remotely log into a server over a secure connection. While you can connect to SSH shares in Windows, connecting to one under Linux is a far more integrated experience. For example in KDE’s Dolphin you can connect to the SSH share right within the file browser itself. Then, as you do work, changes can be reflected instantly to the remote server. This saves you a lot of time instead of having to use (S)FTP to transfer files to and from the server. GNOME also has a similar ability through its Connect to Server menu.

Again there are Windows programs that will mirror changes in a local directory to a remote server through SSH but as far as I know Windows Explorer itself does not have this ability (FTP but no SSH?). So next time you are in the mood for web dev, give Linux a shot!

FTP Trials

October 24th, 2009 2 comments

I use FTP for a lot of things, mostly related to website administration. On Windows, my client of choice is WinSCP. It has this great feature that allows you to constantly synchronize a local directory with a remote directory, allowing you to make changes in your local editor of choice, and have them reflected on the site as soon as you save the file.

On Linux, I’ve been remoting into the server via SSH, opening the remote file in nano, and copying and pasting my local code to the server. While the combination of SSH and bash scripting can allow for some really cool code, I’d rather just find an application that mimics the WinSCP functionality that I’m looking for.

To that end, I have raided Synaptic and downloaded as many different graphical FTP clients as I could find. Read on, dear reader, as I delve into the depths of FTP on Linux, and share my findings with you.

1. BareFTP
This app is written in C# (for really cool cross-platform action), and targets the Mono framework on the GNOME desktop environment. It supports the FTP, FTPS, and SFTP protocols, and has a nice, clean looking interface:

bareFTP-Screenshot

It's pretty and functional, no?

I really like this app. It has a nice, intuitive interface, feels quick, and supports bookmarks that let you automatically connect to a remote server and set your local and remote directories with a single button click. Unfortunately, the program does not appear to support any kind of scripting or directory watching, so while it may see use as a client for occasional file transfers, it likely won’t suffice as a WinSCP replacement.

2. Filezilla
Before discoving WinSCP, I used this app for a long time on Windows. It’s an excellent utility that seems to have improved quite a bit since the last time I used it.

More features along with a more cluttered interface.

More features along with a more cluttered interface.

Of particular interest to me are the Synchronized Browsing and Directory Comparison features. The former changes the remote directory whenever you change the local directory, so that you can always keep an eye on the difference between local and remote files. To that end, the latter feature applies a colour coded scheme to both local and remote files so that you know exactly what has been synchronized to the server and what hasn’t. However, like bareFTP, there is no synchronization support.

And Others…
The unfortunate part about this little exercise is that after trying another three FTP clients, I realized that they’re roughly all the same. Sure, some are uglier, like JFTP, and some are uber streamlined like kasablanca. Unfortunately, even though they all do the same task in a slightly different way, none of them do quite what I want.

And so I ask you, the reader – is there an FTP client that allows me to synchronize a local directory with a remote one?