-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.cygwin
118 lines (83 loc) · 3.79 KB
/
README.cygwin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
ProFTPD README.Cygwin
=====================
Introduction
------------
Cygwin is a UNIX-like environment framework for Microsoft Windows
98/NT/2000/XP operating systems. Most programs that you are used to using
can compile and behave exacttly the same way as on your favorite Unix
system. However, there are some minor differences and compatibility issues.
Configuring and Compiling
-------------------------
In standard Cygwin setup, there's no such username as 'root'. By default,
the configure script assigns 'Administrator' as the installation username.
Should you want to change this, then specify a username in the
'install_user' environment variable.
The rest of the installation process is as usual:
./configure
make
make install
Note: Cygwin does not currently support large files (e.g. files larger than
2 GB). Also, Cygwin 1.3.22 or later should be installed. Earlier versions
of Cygwin would result in error messages like:
426 Transfer aborted. Socket operation on non-socket
Installing as Windows service
-----------------------------
Create a shell script and put it somewhere, with the following contents:
--8<--Cut here--
#!/bin/sh
# File: proftpd-config.sh
# Purpose: Installs proftpd daemon as a Windows service
cygrunsrv --install proftpd \
--path /usr/local/sbin/proftpd.exe \
--args "--nodaemon" \
--type manual \
--disp "Cygwin proftpd" \
--desc "ProFTPD FTP daemon"
--8<--Cut here--
The --nodaemon option is important. It prevents the process from detaching.
Thus you can always shut it down with "net stop proftpd" command.
After running this script, you may run the daemon with "net start proftpd"
command. Or, change the type from "manual" to "auto", and it will run on the
system startup.
You can remove the service with the command:
cygrunsrv --remove proftpd
Installing as inetd service
-----------------------------
Edit the corresponding line in /etc/inetd.conf:
ftp stream tcp nowait root /usr/local/sbin/in.proftpd in.proftpd
You can specify an alternative configuration file with -c option.
Configuration File
------------------
The default configuration file resides in /usr/local/etc/proftpd.conf.
However, the default version of the proftpd.conf created by the installation
script is unusable within the Cygwin environment.
Some configuration directives need to be changed as follows:
ServerType standalone|inetd
Needs to be set correctly. Having standalone when running from inetd
produces daemon processes which are difficult or impossible to kill.
User System
Group Administrators
By default, a Windows service runs as the SYSTEM user, and if User
directive specifies some other user, ProFTPD fails to change to that
user. Also, if no User directive given, the daemon tries to change
the uid to the SYSTEM user ID.
Using a less privileged user and/or group will result in errors
when users attempt to login.
<Anonymous directory_name>
The user specified in User directive should exist as a Windows
account. In Windows User Manager, this login can be even disabled.
As usual, make sure you have this entry in the Cygwin /etc/passwd
file (produced by mkpasswd.exe).
UserPassword username encrypted_passwd
The encrypted password can be produced with the "openssl passwd"
command.
When a user logs in, the following non-fatal warnings will appear in the
proftpd logs:
error setting write fd IP_TOS: Invalid argument
error setting read fd IP_TOS: Invalid argument
error setting write fd TCP_NOPUSH: Protocol not available
error setting read fd TCP_NOPUSH: Protocol not available
Author:
Stanislav Sinyagin
CCIE #5478