It's time to organize file storage, both within the network and outside. This article is a continuation of the
first part on setting up a WiFi router on your home server . All hard drives from your home computer (except the system one) can be transferred to the server, since the transfer rate varies around 10-20 megabytes per second [this parameter also depends greatly on the model of your hard disk], and by the way, time for the system drive to buy SSD drives.
FTP Server.There are many ftp servers for linux, many good ones, many bad ones, but there is a better one
[naturally, this is a subjective opinion, and the best for me] and this is
vsftpd . We will consider it.
You can download it from the standard
OpenSUSE repositories by running the command in the terminal:
zypper in vsftpd
We now turn to the description. This is a console ftp server, it doesn’t have a GUI [GUI], so all configuration occurs in one single config, at
/etc/vsftpd.conf .
Here is an example of a working config:
In the above config there are no problems for the distribution of access rights to individual users, separate folders. Everything is pretty simple and concise, set up once and use [enjoy]. Vsftpd was chosen because it has the best system for setting access rights, which is divided into two types: internal, system authentication and external, with a separate configuration file for distributing access rights, but at the same time, users are also taken from the system.
In this example, both users and the access rights of these users are taken from the system, the additional config file is not used.

Figure 1. Setting Rights
That's all for it.
SambaDo you want to always have on hand file storage of all collections and everything else from a laptop, from a home computer, from a phone, from a tablet? Go.
')
Initially, with a standard installation of the OpenSUSE system, everything you need to install and configure samba on the server is already preinstalled. Therefore, we proceed directly to the setting. Since access from under Windows OS as a “Network Drive Connection” will be available only inside your local network
[there is an ftp server for the Internet, and besides, it is extremely safe to post a samba to the Internet, but we are “FOR SECURITY! !! Hurray! ”] So the settings will be extremely trite and easy to understand. There are two [known to me and adequate in my opinion] samba settings, this is through, all the same, the configuration file and with the help of the utility -
WebMin . This is a cool thing, especially for those who don't like picking configs
[but there are some nuances here] . In this article we will not dwell on funds "
for the lazy, " so we continue. We will consider the working config file. It is located at:
/etc/samba/smb.conf . Here he is:
[global]
Also, additional configuration can be done through the samba GUI built into YaST.
The user that we specified at the very beginning of the config, in this example, is the user
nobody , must be created directly in the system. Ask him the necessary rights (at home, it makes sense to put full rights to create, delete, edit all files and folders (i.e. 777 rights). Also, if you run into a situation where, for some reason, it becomes impossible to delete / create files in any of the folders on the server, then run the command:
chmod 777 -R /path
Let's look at it, just in case:
chmod is the installation command.
777 - proper rights, in letter designation mean rwx, rwx, rwx - read, write, execute rights for the owner, the group (where the owner is), all.
-R is the recursion key, so that the command is executed not only for the folder (and files in it) that you specified in
/ path , but also for all sub-folders and files in them too.
/ path - path to the folder to which you want to set permissions. A similar command corresponds to the FTP server if similar problems occur. Yes, and it is necessary to make a reservation that if such problems arise, then most likely the problem lies in the users created in the system, and more precisely in the rights granted to use their home directories.
rTorrent.Semi-automated torrent client.
In fact, this is a regular torrent client, but, the settings that are very rich in variety. Now we will analyze one very useful function of this client. Imagine, you have already set up a samba on your home server, the file storage located on the server is connected to your computer as a Network Drive, you open your network drive, open the torrents folder, open the music folder and move all the torrent files there want to download and ... everything, go to bed. In the morning, the hashes of all the torrents that you put there will already be downloaded and checked (here, of course, it all depends on how many torrents you want to download, what is their weight and how wide is your Internet channel). Like? So I bastard already half a year from this function.
Let's figure it out.
You need to install
rtorrent , run the following command in the terminal:
zypper in rtorrent
After you have downloaded and installed rtorrent torrent client, you need to configure the client. The program is configured using the
.rtorrent.rc configuration file located in the user's home directory. (By default, the .rtorrent.rc file is missing. You need to create it yourself. I give an example with detailed comments on the working config:

Figure 2. The main window of the rTorrent program
Actually that's all. Next, a tricky trick - open the console and write (you can also go to the server via ssh):
screen rtorrent
Further, a torrent client will open in the terminal, in the same place you can configure and debug it additionally. Now press the magic key combination Ctrl + A then Ctrl + D and the console will gladly inform you that:
[detached]

Figure 3. “Screening” of the rTorrent process.
This suggests that the process of your torrent client "zakrinin", that is, executed, but it is not visible. For those adepts who are always interested in everything, they can read about this utility to burden their heads with such things (although they are very interesting and informative, and are often used) I do not want to forcibly.
If you need to open a client, we write:
screen -r
IMPORTANT: If you want to start the torrent client as root (root, i.e. via the sudo command), you need to create a config file in the root directory of the root user, and also, screen -r must also be executed under the same user under which you "zskrinili" her.
Thus, you will always have a torrent client in the background that will download and distribute exactly as much as your server will work.On this “important” note, I want to finish this article. Thank you for your attention, and yes, use
Google search engine, it is well done!
If the wrong topic, tell me where to move.