Running a RISC OS file server with Samba

posted in: Software, Technology | 1

RISC OS is best known for its stability and performing with very little resource. Things rarely break and unless there’s an application-specific error the operating system will just run until hardware components die. Naturally this makes RISC OS a prime candidate for running a file server that needs to be up 24/7, collecting back-ups and storing important files.

The only limitation with using RISC OS as a file server is it’ll be next to useless in acting as a media server for offering video streaming services to client machines. This is because Unix-like systems that are commonly used for media servers utilise ‘binary blobs’ that can interact at a low level with the Graphics Processing Unit (GPU) making high-quality video decoding easy as pie.

Like a VGA card of old, RISC OS only really considers the GPU to be a framebuffer which means video decoding must be done in software. In theory, serving media files from RISC OS running on a very powerful processor may give positive-ish results, but I wouldn’t want to put it to the test.

When looking around for various file transfer solutions that I could use on RISC OS, my first port of call was SFTP as it’s a protocol I widely use for accessing files on other non-RISC OS systems I use.

A year or so ago on this very blog I also took a look at SSH on RISC OS, which took a look what offerings are available to us to communicate securely with remote systems.

While there are a number of good SSH and SFTP options available for RISC OS, none of them including the port of OpenSSH offer the ability to run an SSH server, so you’re limited to accessing other SSH systems from your RISC OS desktop rather than vice versa.

From what I can also find, all FTP server applications for RISC OS are pretty ancient and are no longer compatible with 32-bit RISC OS.

That leaves me with Samba – it’s widely used amongst RISC OS users and it’s highly compatible with other non-RISC OS systems.

What is Samba?

Samba is a free software re-implementation of Microsoft’s SMB/CIFS networking protocol. It provides file and printer sharing services and is especially widely used on the Windows operating systems. Samba runs on the majority of major operating systems, Linux, Solaris, the BSDs, MacOS, Windows and more. Samba/SMB is usually pre-installed on most Windows, Mac and Linux systems – and can usually be configured to act as a file server with very little effort.

Samba on RISC OS

The latest version for RISC OS is a port of Samba 2.0.2-19990209 for Unix/Linux – versions of Samba 3.6.3 and lower suffer serious security issues but given that RISC OS is an entirely different beast I find it unlikely that Samba on RISC OS will be exploitable. Saying that, I still wouldn’t expose the Samba port (445) past your firewall and to the wider Internet, that’s always a bad idea regardless of if you’re running it on a RISC OS machine.

Samba for RISC OS is also 32-bit and 26-bit compatible, so it will run on the latest RISC OS compatible systems, including the Raspberry Pi.

Advantages of Samba:

  • Communicate with Windows and Apple systems on your local network with almost no-configuration (providing file-sharing is enabled on those systems)
  • Ability to browse your RISC OS systems’ hard drive(s) on remote Windows, Mac and Linux machines
  • Free and open-source software
  • Very fast and responsive on a local network

Disadvantages of Samba:

  • RISC OS port is of an out-dated version of Samba
  • Not a good solution if you want your server to be accessible from outside your home network
  • Samba doesn’t utilise encryption, data is passed between systems in plain text

Setting up the Samba server on RISC OS

Samba requires at least 8MB of memory in order to run. Once !smbserver has been downloaded and unzipped into a location on your hard drive, run it and a Samba icon should appear on the left side of the iconbar.

Please note that the latest version of !smbserver (v0.08) relies on you already having version 0.07a installed on your machine. So to install from scratch, download 0.07a and place it into somewhere on your drive, then download 0.08 and drag the !smbserver icon over the existing 0.07a to overwrite it.

Something else to keep in mind when downloading the Samba server application from here, the downloaded files are not pre-configured to show up as Zip files, RISC OS will just show it as a data file. To fix this just middle click on the !smbserver icon and go down to Type, set the type to Zip.

Once run, you can then configure !smbserver so that a remote computer can connect to it remotely and pull or drop files from it. Middle click on the Samba iconbar icon then click ‘Configure’ to bring up the main configuration options, fill in the relevant entries with the details for your specific setup:

  • ifconfig -a output showing my machine’s IP address

    Server string – This field allows you to set a name for what your RISC OS Samba share will look like to other machines – e.g. Sion’s RISC OS NAS

  • Interfaces – Enter the IP address of your the machine you’re setting up the server on. Running the ‘ifconfig -a‘ command on the RISC OS command line will show you the IP address assigned to your machine – on most home network it will be something like The subnet mask is in /xx notation, with the most common setting being /24 which is equivalent to (ie. 24 bits being masked).
  • Workgroup – This is where you can definie what local workgroup you want your Samba server to be available on. In most cases it’s safe to leave it as WORKGROUP.

The other settings can be left as default unless you have a specific need to change them. That’s it for setting up the Samba server itself.

Next we’ll need to configure what drives are available for other machines to access. If you click on the Samba iconbar icon it will bring up your Samba shares, by default yours will be called ‘MyRiscPC’ but if you middle click on it, go to ‘Share MyRiscPC’ hover over to ‘Rename’ then you can change it to something else. This name will be visible as a folder you can browse to when you’re accessing your Samba server from other computers.

Configure a folder to share

The final step is to configure a folder on your computer that will be accessible to other machines who’re connecting to it via Samba.

Unless you configure the folder to be ‘read only’ this folder will allow anyone who’s connected to it to be able to drop files into it, delete files, edit them etc.

In my instance I created a folder on my hard drive called ‘Public’. I then clicked on the Samba icon then the name of my Share to bring up the configuration page for what folder I’d like shared via Samba.

In my example I’m using RPCEmu so the path to my Public folder is HostFS::HostFS.$.Public – if you’re running RISC OS natively then your path will be ADFS::HardDisc4.$.Public unless you’ve configured your hard drive under another name.

Once that’s done, enable or disable any options as you see fit then click OK.

Setup a password

To set a password for your share, middle click on the Samba icon again, go to ‘Share MyRiscPC’ then hover over to ‘Set Password’.

Unless you’ve specifically configured your router’s firewall to allow port 445 to be accessible past your local network, then this Samba server will only be accessible to other computers on your network.

In most cases it’s safe to leave your share open with no password, as it’ll only be users on your home network that can look and edit files in your shared Samba folder.

Configure Samba to run on boot

As a last step, you’ll most likely want to ensure that !smbserver automatically runs whenever the machine boots into RISC OS just in case of any unexpected reboots.

Editing the ‘PreDesk’ configuration file located here will provide this functionality – !Boot.Choices.Boot.PreDesk

Local network configuration

If you want to access your RISC OS machine via Samba from an external network (your work’s network for example) then you’ll need to enable the firewall your Samba server is passing through to allow connections over port 445 TCP . With most setups this can be achieved by adding a port forwarding rule in your router’s firewall to allow TCP connections over port 445.

Should you decide you don’t require access to your Samba server from an external network – for example, you only need to connect to it from devices in your home, or you use a VPN connection to remotely access your network remotely – then you don’t need to do anything, traffic should pass over port 445 without a problem unless you have device-specific firewalls blocking this port (you’ll probably know about it if this is the case).

Accessing your Samba server from other computers

Accessing your RISC OS Samba server from other computers is pretty easy. All major operating systems will allow you to access a Samba server on your network directly from your file manager.

Windows – On Windows, it’s just a case of clicking onto ‘File Explorer’ then clicking the ‘Network’ option on the left side of the window.

If you click onto your RISC OS computer’s name, in my screenshot it’s 192, you’ll then see the folder you’ve told !smbserver to share there, in my case it’s called ‘RISCOSBlog’.

If you’ve set a password on your Samba share then you’ll be prompted to enter it when you attempt to click into the folder.

Mac OS – On a Mac it’s just a case of bringing up ‘Finder’ and navigating down to ‘Shared’ on the left side of the window. There you’ll find your Samba server that you can click into and access just like you would a part of your hard drive.

Linux and other Unix-like systems – Methods of accessing Samba shares on Linux and other Unix-like operating systems vary but in the majority of cases it’s just a case of going to your file manager application and navigating to the section that allows you to look at other computers on your network.

Automation – Automating file uploads to your Samba server is also possible. Say for example you want all your computers to send backups of themselves every night to your RISC OS file server. Ways of doing this vary between operating systems, it’s possible to do this with a basic scripts on Linux/Unix systems.

Modern versions of Windows allows you to do this by going to the ‘Backup settings’ utility and configuring your system or certain folders to back up to your Samba server at specific times.

There we have it!

You now have your RISC OS system configured to act as a file server for other computers and devices on your network. Desktops, laptops, tablets and phones will be able to use your Samba server as a central hub for dropping in files, documents, backups etc.

One Response

  1. No need to rummage around at the command line to get the IP address.
    Run Configure -> Network -> Internet -> Interfaces
    and click on the “Status” button for whichever is your Ethernet interface.

Leave a Reply