ACC SHELL
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 29. Setting up an FTP server with YaST</title><link rel="stylesheet" href="susebooks.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Documentation"><link rel="up" href="part.reference.services.html" title="Part V. Services"><link rel="prev" href="cha.apache2.html" title="Chapter 28. The Apache HTTP Server"><link rel="next" href="part.reference.mobility.html" title="Part VI. Mobility"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header" border="0" class="bctable"><tr><td width="80%"><div class="breadcrumbs"><p><a href="index.html"> Documentation</a><span class="breadcrumbs-sep"> > </span><a href="book.opensuse.reference.html">Reference</a><span class="breadcrumbs-sep"> > </span><a href="part.reference.services.html">Services</a><span class="breadcrumbs-sep"> > </span><strong><a accesskey="p" title="Chapter 28. The Apache HTTP Server" href="cha.apache2.html"><span>◀</span></a> </strong></p></div></td></tr></table></div><div class="chapter" title="Chapter 29. Setting up an FTP server with YaST"><div class="titlepage"><div><div><h2 class="title"><a name="cha.ftp"></a>Chapter 29. Setting up an FTP server with YaST<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#cha.ftp">¶</a></span></h2></div></div></div><div class="toc"><p><b>Contents</b></p><dl><dt><span class="sect1"><a href="cha.ftp.html#sec.ftp.start">29.1. Starting the FTP server</a></span></dt><dt><span class="sect1"><a href="cha.ftp.html#sec.ftp.general">29.2. FTP General Settings</a></span></dt><dt><span class="sect1"><a href="cha.ftp.html#sec.ftp.performance">29.3. FTP Performance Settings</a></span></dt><dt><span class="sect1"><a href="cha.ftp.html#sec.ftp.auth">29.4. Authentication</a></span></dt><dt><span class="sect1"><a href="cha.ftp.html#sec.ftp.expert">29.5. Expert Settings</a></span></dt><dt><span class="sect1"><a href="cha.ftp.html#sec.ftp.info">29.6. For more information</a></span></dt></dl></div><a class="indexterm" name="id500458"></a><a class="indexterm" name="id500466"></a><div class="abstract" title="Abstract"><p class="title"><b>Abstract</b></p><p>
Using the YaST <span class="guimenu">FTP Server</span> module, you can configure
your machine to function as an FTP (File Transfer Protocol) server.
Anonymous and/or authenticated users can connect to your machine and
download files using the FTP protocol. Depending on the configuration,
they can also upload files to the FTP server. YaST provides a unified
configuration interface for various FTP server daemons installed on your
system.
</p></div><p>
You can use the YaST <span class="guimenu">FTP Server</span> configuration module
to configure two different FTP server daemons:
</p><div class="itemizedlist"><ul class="itemizedlist" type="bullet"><li class="listitem" style="list-style-type: disc"><p>
<code class="systemitem">vsftpd</code> (Very Secure FTP Daemon)
and
</p></li><li class="listitem" style="list-style-type: disc"><p>
<code class="systemitem">pure-ftpd</code>
</p></li></ul></div><p>
Only installed servers can be configured. <span> Standard
openSUSE® media do not contain the
<code class="systemitem">pure-ftpd</code> package. However,
if the <code class="systemitem">pure-ftpd</code> package is
installed from another repository, it can be configured using the YaST
module. </span>
</p><p>
The vsftpd and pure-ftpd servers have slightly different configuration
options, especially in the <span class="guimenu">Experts Settings</span> dialog.
This chapter describes the settings of the vsftpd server
<span>, being the default server for openSUSE</span> .
</p><p>
If the YaST FTP Server module is not available in your system, install
the <code class="systemitem">yast2-ftp-server</code> package.
</p><p>
To configure the FTP server using YaST, follow these steps:
</p><div class="procedure"><ol class="procedure" type="1"><li><p>
Open YaST Control Center and choose <span class="guimenu">Network
Services</span>+<span class="guimenu">FTP Server</span> or run
the <span class="command"><strong>yast2 ftp-server</strong></span> command as <code class="systemitem">root</code>.
</p></li><li><p>
If there is not any FTP server installed in your system, you will be
asked which server to install when the YaST FTP Server module starts.
Choose a server <span>(vsftpd is the standard server for
openSUSE) </span>and confirm the dialog.
</p></li><li><p>
In the <span class="guimenu">Start-Up</span> dialog, configure the options for
starting of the FTP server. For more information, see
<a class="xref" href="cha.ftp.html#sec.ftp.start" title="29.1. Starting the FTP server">Section 29.1, “Starting the FTP server”</a>.
</p><p>
In the <span class="guimenu">General</span> dialog, configure FTP directories,
welcome message, file creation masks and various other parameters. For
more information, see <a class="xref" href="cha.ftp.html#sec.ftp.general" title="29.2. FTP General Settings">Section 29.2, “FTP General Settings”</a>.
</p><p>
In the <span class="guimenu">Performance</span> dialog, set the parameters that
affect the load on the FTP server. For more information, see
<a class="xref" href="cha.ftp.html#sec.ftp.performance" title="29.3. FTP Performance Settings">Section 29.3, “FTP Performance Settings”</a>.
</p><p>
In the <span class="guimenu">Authentication</span> dialog, set whether the FTP
server should be available for anonymous and/or authenticated users. For
more information, see <a class="xref" href="cha.ftp.html#sec.ftp.auth" title="29.4. Authentication">Section 29.4, “Authentication”</a>.
</p><p>
In the <span class="guimenu">Expert Settings</span> dialog, configure the
operation mode of the FTP server, SSL connections and firewall settings.
For more information, see <a class="xref" href="cha.ftp.html#sec.ftp.expert" title="29.5. Expert Settings">Section 29.5, “Expert Settings”</a>.
</p></li><li><p>
Press <span class="guimenu">Finish</span> to save the configurations.
</p></li></ol></div><div class="sect1" title="29.1. Starting the FTP server"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec.ftp.start"></a>29.1. Starting the FTP server<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.ftp.start">¶</a></span></h2></div></div></div><p>
In the <span class="guimenu">Service Start</span> frame of the <span class="guimenu">FTP
Start-Up</span> dialog set the way the FTP server is started up. You
can choose between starting the server automatically during the system
boot and starting it manually. If the FTP server should be started only
after an FTP connection request, choose <span class="guimenu">Via xinetd</span>.
</p><p>
The current status of the FTP server is shown in the <span class="guimenu">Switch On
and Off</span> frame of the <span class="guimenu">FTP Start-Up</span> dialog.
Start the FTP server by clicking <span class="guimenu">Start FTP Now</span>. To
stop the server, click <span class="guimenu">Stop FTP Now</span>. After having
changed the settings of the server click <span class="guimenu">Save Settings and
Restart FTP Now</span>. Your configurations will be saved by leaving
the configuration module with <span class="guimenu">Finish</span>.
</p><p>
The <span class="guimenu">Selected Service</span> frame of the <span class="guimenu">FTP
Start-Up</span> dialog shows which FTP server is used: either vsftpd
or pure-ftpd. If both servers are installed, you can switch between
them—the current configuration will automatically be converted.
<span>The pure-ftpd package is not included in the standard
openSUSE media so you have to install it from a different installation
source if you want to use it.</span>
</p><div class="figure"><a name="fig.yast2.ftp-start-up"></a><p class="title"><b>Figure 29.1. FTP Server Configuration — Start-Up</b><span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#fig.yast2.ftp-start-up">¶</a></span></p><div class="figure-contents"><div class="mediaobject"><table border="0" summary="manufactured viewport for HTML img" cellspacing="0" cellpadding="0" width="75%"><tr><td><img src="images/yast2_ftp-start-up.png" width="100%" alt="FTP Server Configuration — Start-Up"></td></tr></table></div></div></div><br class="figure-break"></div><div class="sect1" title="29.2. FTP General Settings"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec.ftp.general"></a>29.2. FTP General Settings<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.ftp.general">¶</a></span></h2></div></div></div><p>
In the <span class="guimenu">General Settings</span> frame of the <span class="guimenu">FTP
General Settings</span> dialog you can set the <span class="guimenu">Welcome
message</span> which is shown after connecting to the FTP server.
</p><p>
If you check the <span class="guimenu">Chroot Everyone</span> option, all local
users will be placed in a chroot jail in their home directory after
login. This option has security implications, especially if the users
have upload permission or shell access, so be careful enabling this
option.
</p><p>
If you check the <span class="guimenu">Verbose Logging</span> option, all FTP
requests and responses are logged.
</p><p>
You can limit permissions of files created by anonymous and/or
authenticated users with umask. Set the file creation mask for anonymous
users in <span class="guimenu">Umask for Anonymous</span> and the file creation
mask for authenticated users in <span class="guimenu">Umask for Authenticated
Users</span>. The masks should be entered as octal numbers with a
leading zero. For more information about umask, see the umask man page
(<span class="command"><strong>man 1p umask</strong></span>).
</p><p>
In the <span class="guimenu">FTP Directories</span> frame set the directories used
for anonymous and authorized users. With <span class="guimenu">Browse</span>, you
can select a directory to be used from the local filesystem. The default
FTP directory for anonymous users is <code class="filename">/srv/ftp</code>. Note
that vsftpd does not allow this directory to be writable for all users.
The subdirectory <code class="filename">upload</code> with write permissions for
anonymous users is created instead.
</p><div class="note"><table border="0" cellpadding="3" cellspacing="0" width="100%" summary="Note: Write Permissions in FTP Directory"><tr class="head"><td width="32"><img alt="[Note]" src="admon/note.png"></td><th align="left">Write Permissions in FTP Directory</th></tr><tr><td colspan="2" align="left" valign="top"><p>
The pure-ftpd server allows the FTP directory for anonymous users to be
writable. When switching between servers, make sure you remove the write
permissions in the directory that was used with pure-ftpd before
switching back to the vsftpd server.
</p></td></tr></table></div></div><div class="sect1" title="29.3. FTP Performance Settings"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec.ftp.performance"></a>29.3. FTP Performance Settings<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.ftp.performance">¶</a></span></h2></div></div></div><p>
In the <span class="guimenu">Performance</span> dialog set the parameters which
affect the load on the FTP server. <span class="guimenu">Max Idle Time</span> is
the maximum time (in minutes) the remote client may spend between FTP
commands. In case of longer inactivity, the remote client is
disconnected. <span class="guimenu">Max Clients for One IP</span> determines the
maximum number of clients which can be connected from a single IP
address. <span class="guimenu">Max Clients</span> determines the maximum number of
clients which may be connected. Any additional clients will get an error
message.
</p><p>
The maximum data transfer rate (in KB/s) is set in <span class="guimenu">Local Max
Rate</span> for local authenticated users, and in <span class="guimenu">Anonymous
Max Rate</span> for anonymous clients respectively. The default value
for the rate settings is <code class="literal">0</code>, which means unlimited data
transfer rate.
</p></div><div class="sect1" title="29.4. Authentication"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec.ftp.auth"></a>29.4. Authentication<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.ftp.auth">¶</a></span></h2></div></div></div><p>
In the <span class="guimenu">Enable/Disable Anonymous and Local Users</span> frame
of the <span class="guimenu">Authentication</span> dialog, you are able to set
which users are allowed to access your FTP server. You can choose between
the following options: granting access to anonymous users only, to
authenticated users only (with accounts on the system) or to both types
of users.
</p><p>
If you want to allow users to upload files to the FTP server, check
<span class="guimenu">Enable Upload</span> in the <span class="guimenu">Uploading</span>
frame of the <span class="guimenu">Authentication</span> dialog. Here you are able
to allow uploading or creating directories even for anonymous users by
checking the respective box.
</p><div class="note"><table border="0" cellpadding="3" cellspacing="0" width="100%" summary="Note: vsftp—Allowing File Upload for Anonymous Users"><tr class="head"><td width="32"><img alt="[Note]" src="admon/note.png"></td><th align="left">vsftp—Allowing File Upload for Anonymous Users</th></tr><tr><td colspan="2" align="left" valign="top"><p>
If a vsftpd server is used and you want anonymous users to be able to
upload files or create directories, a subdirectory with writing
permissions for all users has to be created in the anonymous FTP
directory.
</p></td></tr></table></div></div><div class="sect1" title="29.5. Expert Settings"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec.ftp.expert"></a>29.5. Expert Settings<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.ftp.expert">¶</a></span></h2></div></div></div><p>
An FTP server can run in active or in passive mode. By default the server
runs in passive mode. To switch into active mode, just uncheck
<span class="guimenu">Enable Passive Mode</span> option in <span class="guimenu">Expert
Settings</span> dialog. You can also change the range of ports on the
server used for the data stream by tweaking the <span class="guimenu">Min Port for
Pas. Mode</span> and <span class="guimenu">Max Port for Pas. Mode</span>
options.
</p><p>
If you want encrypted communication between clients and the server, you
can <span class="guimenu">Enable SSL</span>. Check the versions of the protocol to
be supported and specify the DSA certificate to be used for SSL encrypted
connections.
</p><p>
If your system is protected by a firewall, check <span class="guimenu">Open Port in
Firewall</span> to enable a connection to the FTP server.
</p></div><div class="sect1" title="29.6. For more information"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec.ftp.info"></a>29.6. For more information<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.ftp.info">¶</a></span></h2></div></div></div><p>
For more information about FTP servers read the manual pages of
<span class="command"><strong>vsftpd</strong></span> and <span class="command"><strong>vsftpd.conf</strong></span>.
</p></div></div><div class="navfooter"><table width="100%" summary="Navigation footer" border="0" class="bctable"><tr><td width="80%"><div class="breadcrumbs"><p><a href="index.html"> Documentation</a><span class="breadcrumbs-sep"> > </span><a href="book.opensuse.reference.html">Reference</a><span class="breadcrumbs-sep"> > </span><a href="part.reference.services.html">Services</a><span class="breadcrumbs-sep"> > </span><strong><a accesskey="p" title="Chapter 28. The Apache HTTP Server" href="cha.apache2.html"><span>◀</span></a> </strong></p></div></td></tr></table></div></body></html>
ACC SHELL 2018