Connect your drive
The best way to safely and conveniently access your drive from various devices is to create a dedicated user and mount your drive into that user home directory.
Add a user named mediaserver
with his home directory and set password:
Create ssd
directory:
List connected drives:
You should see something like that:
In my case I want to use partition sda2
as shared drive.
Ensure that the drive is mounted after each boot:
Add the following line at the end of the file:
Mount drive in mediaserver home dir:
Samba
Install Samba service if you want to access your data as a network share in Windows.
Install samba, set password for user mediaserver
and edit configuration file:
And add the following line at the end of the file:
Restart Samba to load the configuration changes:
FTP server
Install an FTP server if you want to access your drive via FTP, e.g. from a smartphone or the Internet after setting up a firewall.
Install FTP server:
Edit vsftpd conf file:
With:
Make user list:
In the file, enter the list of users who will have access to FTP (EOL separated).
Restart service:
Tip: By default, all newly created Linux users have access to their accounts via FTP. You can change this by creating a black/white list.
DLNA server
Install a DLNA server if you want to stream media from your hard drive to devices such as Smart TV.
Edit configuration file to set up media directories:
With:
Restart service and recreate database:
Most of smart devices will automatically recognize you service. If not, you can access your DLNA server on port 8200 (http://xxx.xxx.xxx.xxx:8200).