source: vendor/current/ctdb/web/ftp.html

Last change on this file was 988, checked in by Silvan Scherrer, 9 years ago

Samba Server: update vendor to version 4.4.3

File size: 3.0 KB
Line 
1<!--#set var="TITLE" value="CTDB and ftp" -->
2<!--#include virtual="header.html" -->
3
4<h1>Setting up clustered FTP</h1>
5
6<h2>Prereqs</h2>
7Configure CTDB as above and set it up to use public ipaddresses.<br>
8Verify that the CTDB cluster works.
9
10<h2>Configuration</h2>
11
12Setting up a vsftpd cluster is really easy.<br>
13Configure vsftpd on each node on the cluster.<br><br>
14Set up vsftpd to export directories from the shared cluster filesystem.
15
16<h2>/etc/sysconfig/ctdb</h2>
17
18Add the following line to the /etc/sysconfig/ctdb configuration file.
19<pre>
20 CTDB_MANAGES_VSFTPD=yes
21</pre>
22
23Disable vsftpd in chkconfig so that it does not start by default. Instead CTDB will start/stop vsftdp as required.
24<pre>
25 chkconfig vsftpd off
26</pre>
27
28<h2>PAM configuration</h2>
29PAM must be configured to allow authentication of CIFS users so that the ftp
30daemon can authenticate the users logging in.
31
32Make sure the following line is present in /etc/pam.d/system-auth
33<pre>
34auth sufficient pam_winbind.so use_first_pass
35
36</pre>
37If this line is missing you must enable winbind authentication by running
38<pre>
39authconfig --enablewinbindauth --update
40authconfig --enablewinbind --update
41</pre>
42
43<h2>Default shell</h2>
44To log in to the ftp server, the user must have a shell configured in smb.conf.
45
46Add the following line to the globals section of /etc/samba/smb.conf
47<pre>
48 template shell = /bin/bash
49</pre>
50
51<h2>Home directory</h2>
52FTP users must have a home directory configured so they can log in.
53Configure samba to provide home directories for domain users. These home
54directories should be stored on shared storage so they are available from
55all nodes in the cluster.<br>
56
57
58A simple way to create homedirectories are to add
59<pre>
60 template homedir = /&lt;shared storage&gt;/homedir/%D/%U
61</pre>
62to /etc/samba/smb.conf .<br>
63
64The homedirectory must exist or the user will not be able to log in with FTP.
65
66
67<h2>Events script</h2>
68
69The CTDB distribution already comes with an events script for vsftp in the file /etc/ctdb/events.d/40.vsftpd<br><br>
70There should not be any need to edit this file.
71
72
73<h2>Restart your cluster</h2>
74Next time your cluster restarts, CTDB will start managing the vsftp service.<br><br>
75If the cluster is already in production you may not want to restart the entire cluster since this would disrupt services.<br>
76
77Insted you can just disable/enable the nodes one by one. Once a node becomes enabled again it will start the vsftp service.<br><br>
78
79Follow the procedure below for each node, one node at a time :
80
81<h3>1 Disable the node</h3>
82Use the ctdb command to disable the node :
83<pre>
84 ctdb -n NODE disable
85</pre>
86
87<h3>2 Wait until the cluster has recovered</h3>
88
89Use the ctdb tool to monitor until the cluster has recovered, i.e. Recovery mode is NORMAL. This should happen within seconds of when you disabled the node.
90<pre>
91 ctdb status
92</pre>
93
94<h3>3 Enable the node again</h3>
95
96Re-enable the node again which will start the newly configured vsftp service.
97<pre>
98 ctdb -n NODE enable
99</pre>
100
101<!--#include virtual="footer.html" -->
102
Note: See TracBrowser for help on using the repository browser.