个人工具

“UbuntuHelp:PureFTP”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(新页面: {{From|https://help.ubuntu.com/community/PureFTP}} {{Languages|UbuntuHelp:PureFTP}} == Pure-ftpd + pureadmin (Ftp server with gui) == These are all steps to follow in order to have a nic...)
 
 
(未显示2个用户的5个中间版本)
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/PureFTP}}
 
{{From|https://help.ubuntu.com/community/PureFTP}}
 
{{Languages|UbuntuHelp:PureFTP}}
 
{{Languages|UbuntuHelp:PureFTP}}
== Pure-ftpd + pureadmin (Ftp server with gui) ==
+
== Pure-FTPD + pureadmin (Ftp server with gui) ==
 
+
=== Install ''Pure-FTPD'' with GUI ===
These are all steps to follow in order to have a nice ftp server with an easy gui.
+
<ol><li>Install the ''pure-ftpd'' package and the ''pureadmin'' package from the Universe Repository.
 
+
</li><li>Then use your favorite text editor and open up the '''/etc/inetd.conf''' file. Comment (add a '''#''' at the start of) the line containing 'ftp'
* Install the <code><nowiki>pure-ftpd</nowiki></code> package if you don't already have it (see InstallingSoftware).
+
</li><li>Again use your favorite text editor and open up the '''/etc/default/pure-ftpd-common''' file. Change '''STANDALONE_OR_INETD=inetd''' to '''STANDALONE_OR_INETD=standalone'''
* Also, install <code><nowiki>pureadmin</nowiki></code> package
+
</li><li>Then <pre><nowiki>
* run 'gksudo gedit /etc/inetd.conf' and comment (add a '''#''' at the start of) the line containing 'ftp'
+
sudo groupadd ftpgroup
* run 'gksudo gedit /etc/default/pure-ftpd-common' and change STANDALONE_OR_INETD=inetd to STANDALONE_OR_INETD=standalone
+
</nowiki></pre> and <pre><nowiki>
* run 'sudo groupadd ftpgroup' and 'sudo useradd -g ftpgroup -d /dev/null -s /etc ftpuser'
+
sudo useradd -g ftpgroup -d /dev/null -s /etc ftpuser
* create ftpuser directory 'sudo mkdir /home/ftpusers'
+
</nowiki></pre> in the terminal.
* create joe user directory 'sudo mkdir /home/ftpusers/joe' (you can create a directory for each ftp user)
+
</li><li>Next create your ftpuser directory <pre><nowiki>
* run 'sudo pure-pw useradd joe -u ftpuser -d /home/ftpusers/joe' (a)
+
sudo mkdir /home/ftpusers
* run 'sudo pure-pw mkdb'
+
</nowiki></pre>
* run 'sudo ln -s /etc/pure-ftpd/pureftpd.passwd /etc/pureftpd.passwd'
+
</li><li>Then to create a user directory for joe <pre><nowiki>
* run 'sudo ln -s /etc/pure-ftpd/pureftpd.pdb /etc/pureftpd.pdb'
+
sudo mkdir /home/ftpusers/joe
* run 'sudo ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/PureDB'
+
</nowiki></pre>  (you can create a directory for each ftp user)
* Create file /etc/pure-ftpd/conf/UnixAuthentication containing only the string 'no' without quotes.
+
</li><li>Then to add user joe <pre><nowiki>
* Modify permissions of /home/ftpusers directory (b) and of any subdirectories. Owner must be ftpuser while Group must be ftpgroup
+
sudo pure-pw useradd joe -u ftpuser -d /home/ftpusers/joe
* run 'gksudo pureadmin'
+
</nowiki></pre>
* stop firestarter if installed
+
</li><li>Then to create you user database <pre><nowiki>
* through "menu editor" modify pureadmin entry command (under 'system tools') from 'pureadmin' to 'gksudo pureadmin'
+
sudo pure-pw mkdb
 +
</nowiki></pre>
 +
</li><li>Then <pre><nowiki>
 +
sudo ln -s /etc/pure-ftpd/pureftpd.passwd /etc/pureftpd.passwd
 +
</nowiki></pre> and <pre><nowiki>
 +
sudo ln -s /etc/pure-ftpd/pureftpd.pdb /etc/pureftpd.pdb
 +
</nowiki></pre> and <pre><nowiki>
 +
sudo ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/PureDB
 +
</nowiki></pre> which will create symbolic links between the respective files.</li></ol>
  
 +
10. Then using your favorite text editor create the  file '''/etc/pure-ftpd/conf/UnixAuthentication''' containing only the string '''no''' without quotes.
 +
11. Next you need to modify the permissions of '''/home/ftpusers directory'''  and of any other subdirectories.  The owner must be '''ftpuser''' while Group must be '''ftpgroup'''
 +
12. After doing that open up pureadmin in the terminal.  <pre><nowiki>
 +
gksudo pureadmin
 +
</nowiki></pre> and stop firestarter if it is installed.
 
===== NOTES =====
 
===== NOTES =====
 
+
The user '''joe''' is used as an example, you can change user '''joe''' and/or add or remove other users through pureadmin.
a. joe will be your test user. You can change user joe and/or add other users through pureadmin
+
You may need to restart PureFTPD before changes take effect. <pre><nowiki>
 
+
sudo /etc/init.d/pure-ftpd restart
b. Easy way to change permissions: run 'gksudo nautilus', go to /home, change owner with ftpuser and group with ftpgroup. Tick special flags 'set user ID' and 'set group ID'. [not sure if these ticks are necessary]
+
</nowiki></pre>
 
+
<<BR>>
Be aware that pureadmin must be run as root.
+
----
 
+
=== TROUBLESHOOTING ===
Download package from here:
+
You may be given one of these warnings when trying to connect to your server:
http://www.ubuntuforums.org/attachment.php?attachmentid=3623&d=1132160866
+
<pre><nowiki>
 
+
[WARNING] Can't login as [joe]: account disabled
 +
</nowiki></pre>
 +
<pre><nowiki>
 +
"Sorry, but I can't trust you"
 +
</nowiki></pre>
 +
These two warnings occur if your system set the UserID (UID) and/or GroupID (GID) associated with the '''ftpuser''' user below 1000. To see what the current values are, type the following at a shell:
 +
<pre><nowiki>
 +
id ftpuser
 +
</nowiki></pre>
 +
You'll be given something similar to the following:
 +
<pre><nowiki>
 +
uid=572(ftpuser) gid=972(ftpgroup) groups=972(ftpgroup)
 +
</nowiki></pre>
 +
The actual numbers don't matter much, but they should be higher then 1000 for Pure-FTPD to be happy.<<BR>> 
 +
To fix the UserID (UID) portion, open a shell and type:
 +
<pre><nowiki>
 +
sudo usermod -u 1021 -p -U ftpuser
 +
</nowiki></pre>
 +
To fix the GroupID (GID):  
 +
<pre><nowiki>
 +
sudo groupmod -g 1022 ftpgroup
 +
</nowiki></pre>
 +
Restart the Pure-FTPD daemon and you should be up and running.
 +
<<BR>><<BR>>
 
Original Ubuntu Forums thread:
 
Original Ubuntu Forums thread:
http://ubuntuforums.org/showthread.php?t=91052
+
http://ubuntuforums.org/showthread.php?t=91052 <<BR>>
 
+
Launch Pad Question: https://answers.launchpad.net/ubuntu/+source/pure-ftpd/+question/99048
[[category:CategoryDocumentation]] [[category:CategoryCleanup]]
+
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2010年5月19日 (三) 23:58的最新版本


Pure-FTPD + pureadmin (Ftp server with gui)

Install Pure-FTPD with GUI

  1. Install the pure-ftpd package and the pureadmin package from the Universe Repository.
  2. Then use your favorite text editor and open up the /etc/inetd.conf file. Comment (add a # at the start of) the line containing 'ftp'
  3. Again use your favorite text editor and open up the /etc/default/pure-ftpd-common file. Change STANDALONE_OR_INETD=inetd to STANDALONE_OR_INETD=standalone
  4. Then
    sudo groupadd ftpgroup
    
    and

    sudo useradd -g ftpgroup -d /dev/null -s /etc ftpuser

    in the terminal.
  5. Next create your ftpuser directory
    sudo mkdir /home/ftpusers
    
  6. Then to create a user directory for joe
    sudo mkdir /home/ftpusers/joe
    
    (you can create a directory for each ftp user)
  7. Then to add user joe
    sudo pure-pw useradd joe -u ftpuser -d /home/ftpusers/joe
    
  8. Then to create you user database
    sudo pure-pw mkdb
    
  9. Then
    sudo ln -s /etc/pure-ftpd/pureftpd.passwd /etc/pureftpd.passwd
    
    and

    sudo ln -s /etc/pure-ftpd/pureftpd.pdb /etc/pureftpd.pdb

    and

    sudo ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/PureDB

    which will create symbolic links between the respective files.

10. Then using your favorite text editor create the file /etc/pure-ftpd/conf/UnixAuthentication containing only the string no without quotes. 11. Next you need to modify the permissions of /home/ftpusers directory and of any other subdirectories. The owner must be ftpuser while Group must be ftpgroup

12. After doing that open up pureadmin in the terminal.
gksudo pureadmin
and stop firestarter if it is installed.
NOTES

The user joe is used as an example, you can change user joe and/or add or remove other users through pureadmin.

You may need to restart PureFTPD before changes take effect.
sudo /etc/init.d/pure-ftpd restart

<
>


TROUBLESHOOTING

You may be given one of these warnings when trying to connect to your server:

 [WARNING] Can't login as [joe]: account disabled
 "Sorry, but I can't trust you" 

These two warnings occur if your system set the UserID (UID) and/or GroupID (GID) associated with the ftpuser user below 1000. To see what the current values are, type the following at a shell:

id ftpuser

You'll be given something similar to the following:

uid=572(ftpuser) gid=972(ftpgroup) groups=972(ftpgroup)

The actual numbers don't matter much, but they should be higher then 1000 for Pure-FTPD to be happy.<
> To fix the UserID (UID) portion, open a shell and type:

sudo usermod -u 1021 -p -U ftpuser

To fix the GroupID (GID):

sudo groupmod -g 1022 ftpgroup

Restart the Pure-FTPD daemon and you should be up and running. <
><
> Original Ubuntu Forums thread: http://ubuntuforums.org/showthread.php?t=91052 <
> Launch Pad Question: https://answers.launchpad.net/ubuntu/+source/pure-ftpd/+question/99048