paperclip-storage-ftp 1.0.0.rc1 → 1.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/.travis.yml +20 -0
- data/Gemfile +6 -0
- data/README.md +6 -1
- data/Rakefile +1 -1
- data/gemfiles/Gemfile.paperclip-2.x +11 -0
- data/gemfiles/Gemfile.paperclip-3.x +11 -0
- data/lib/paperclip/storage/ftp.rb +6 -1
- data/lib/paperclip/storage/ftp/server.rb +16 -3
- data/paperclip-storage-ftp.gemspec +1 -1
- data/spec/integration_spec.rb +32 -0
- data/spec/paperclip/storage/ftp/server_spec.rb +23 -7
- data/spec/paperclip/storage/ftp_spec.rb +13 -1
- data/spec/support/integration/avatar.jpg +0 -0
- data/spec/support/integration/ftp_server.rb +27 -0
- data/spec/support/integration/user.rb +31 -0
- data/vendor/apache-ftpserver/LICENSE +202 -0
- data/vendor/apache-ftpserver/LICENSE.slf4j.txt +28 -0
- data/vendor/apache-ftpserver/LICENSE.springframework.txt +177 -0
- data/vendor/apache-ftpserver/NOTICE +54 -0
- data/vendor/apache-ftpserver/README.txt +73 -0
- data/vendor/apache-ftpserver/bin/appendcp.bat +22 -0
- data/vendor/apache-ftpserver/bin/ftpd.bat +63 -0
- data/vendor/apache-ftpserver/bin/ftpd.exe +0 -0
- data/vendor/apache-ftpserver/bin/ftpd.sh +140 -0
- data/vendor/apache-ftpserver/bin/ftpdw.exe +0 -0
- data/vendor/apache-ftpserver/bin/service.bat +152 -0
- data/vendor/apache-ftpserver/common/classes/log4j.properties +25 -0
- data/vendor/apache-ftpserver/common/lib/README.txt +4 -0
- data/vendor/apache-ftpserver/common/lib/aopalliance-1.0.jar +0 -0
- data/vendor/apache-ftpserver/common/lib/ftplet-api-1.0.6.jar +0 -0
- data/vendor/apache-ftpserver/common/lib/ftpserver-core-1.0.6.jar +0 -0
- data/vendor/apache-ftpserver/common/lib/jcl-over-slf4j-1.5.2.jar +0 -0
- data/vendor/apache-ftpserver/common/lib/log4j-1.2.14.jar +0 -0
- data/vendor/apache-ftpserver/common/lib/mina-core-2.0.4.jar +0 -0
- data/vendor/apache-ftpserver/common/lib/slf4j-api-1.5.2.jar +0 -0
- data/vendor/apache-ftpserver/common/lib/slf4j-log4j12-1.5.2.jar +0 -0
- data/vendor/apache-ftpserver/common/lib/spring-beans-2.5.5.jar +0 -0
- data/vendor/apache-ftpserver/common/lib/spring-context-2.5.5.jar +0 -0
- data/vendor/apache-ftpserver/common/lib/spring-core-2.5.5.jar +0 -0
- data/vendor/apache-ftpserver/res/conf/README.txt +3 -0
- data/vendor/apache-ftpserver/res/conf/ftpd-full.xml +103 -0
- data/vendor/apache-ftpserver/res/conf/ftpd-typical.xml +30 -0
- data/vendor/apache-ftpserver/res/conf/users.properties +37 -0
- data/vendor/apache-ftpserver/res/ftp-db.sql +29 -0
- data/vendor/apache-ftpserver/res/ftpserver.jks +0 -0
- metadata +44 -3
@@ -0,0 +1,28 @@
|
|
1
|
+
Copyright (c) 2004-2007 QOS.ch
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
a copy of this software and associated documentation files (the
|
6
|
+
"Software"), to deal in the Software without restriction, including
|
7
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
distribute, and/or sell copies of the Software, and to permit persons
|
9
|
+
to whom the Software is furnished to do so, provided that the above
|
10
|
+
copyright notice(s) and this permission notice appear in all copies of
|
11
|
+
the Software and that both the above copyright notice(s) and this
|
12
|
+
permission notice appear in supporting documentation.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
17
|
+
OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
18
|
+
HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY
|
19
|
+
SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER
|
20
|
+
RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
|
21
|
+
CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
22
|
+
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
23
|
+
|
24
|
+
Except as contained in this notice, the name of a copyright holder
|
25
|
+
shall not be used in advertising or otherwise to promote the sale, use
|
26
|
+
or other dealings in this Software without prior written authorization
|
27
|
+
of the copyright holder.
|
28
|
+
|
@@ -0,0 +1,177 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
@@ -0,0 +1,54 @@
|
|
1
|
+
// ------------------------------------------------------------------
|
2
|
+
// NOTICE file corresponding to the section 4d of The Apache License,
|
3
|
+
// Version 2.0, in this case for Apache FtpServer
|
4
|
+
// ------------------------------------------------------------------
|
5
|
+
|
6
|
+
Apache FtpServer
|
7
|
+
Copyright 2003-2011 The Apache Software Foundation
|
8
|
+
|
9
|
+
This product includes software developed at
|
10
|
+
The Apache Software Foundation (http://www.apache.org/).
|
11
|
+
|
12
|
+
|
13
|
+
This product includes/uses software, AOP alliance (http://aopalliance.sourceforge.net)
|
14
|
+
License: Public Domain
|
15
|
+
|
16
|
+
This product includes/uses software, Log4j (http://logging.apache.org/log4j/docs/),
|
17
|
+
developed by Apache Software Foundation (http://www.apache.org)
|
18
|
+
License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
|
19
|
+
|
20
|
+
This product includes/uses software, Apache Ftplet API (http://mina.apache.org/ftpserver),
|
21
|
+
developed by The Apache Software Foundation (http://www.apache.org/)
|
22
|
+
License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
|
23
|
+
|
24
|
+
This product includes/uses software, Apache FtpServer Core (http://mina.apache.org/ftpserver/ftpserver-core),
|
25
|
+
developed by The Apache Software Foundation (http://www.apache.org/)
|
26
|
+
License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
|
27
|
+
|
28
|
+
This product includes/uses software, Apache MINA Core (http://mina.apache.org/mina-core/),
|
29
|
+
developed by Apache MINA Project (http://mina.apache.org/)
|
30
|
+
License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
|
31
|
+
|
32
|
+
This product includes/uses software, JCL 1.1.1 implemented over SLF4J (http://www.slf4j.org),
|
33
|
+
developed by QOS.ch (http://www.qos.ch)
|
34
|
+
|
35
|
+
This product includes/uses software, SLF4J API Module (http://www.slf4j.org),
|
36
|
+
developed by QOS.ch (http://www.qos.ch)
|
37
|
+
|
38
|
+
This product includes/uses software, SLF4J LOG4J-12 Binding (http://www.slf4j.org),
|
39
|
+
developed by QOS.ch (http://www.qos.ch)
|
40
|
+
|
41
|
+
This product includes/uses software, Spring Framework: Beans (http://www.springframework.org),
|
42
|
+
developed by Spring Framework (http://www.springframework.org/)
|
43
|
+
License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
|
44
|
+
|
45
|
+
This product includes/uses software, Spring Framework: Context (http://www.springframework.org),
|
46
|
+
developed by Spring Framework (http://www.springframework.org/)
|
47
|
+
License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
|
48
|
+
|
49
|
+
This product includes/uses software, Spring Framework: Core (http://www.springframework.org),
|
50
|
+
developed by Spring Framework (http://www.springframework.org/)
|
51
|
+
License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
|
52
|
+
|
53
|
+
|
54
|
+
|
@@ -0,0 +1,73 @@
|
|
1
|
+
The Apache FtpServer project team is proud to announce the release of
|
2
|
+
Apache FtpServer, version 1.0.4
|
3
|
+
|
4
|
+
The Apache FTP Server is a 100% pure Java FTP server. It's designed to be
|
5
|
+
a complete and portable FTP server engine solution based on currently
|
6
|
+
available open protocols. FtpServer can be run standalone as a Windows
|
7
|
+
service of Unix/Linux daemon, or as embedded into a Java application.
|
8
|
+
The default network support is based on Apache MINA, a high performance
|
9
|
+
asyncronous IO library.
|
10
|
+
|
11
|
+
It is also a FTP application platform. We have developed a Java API to let
|
12
|
+
you write Java code to process FTP event notifications that we call the Ftplet
|
13
|
+
API. Apache FtpServer provides an implementation of FTP server to support
|
14
|
+
this API.
|
15
|
+
|
16
|
+
1.0.6
|
17
|
+
--------------------------------
|
18
|
+
Bug fix release which closes 19 issues since the 1.0.5 release, for example an overhaul of the passive port reservation handling. See full change log at: https://issues.apache.org/jira/browse/FTPSERVER/fixforversion/12315314
|
19
|
+
|
20
|
+
1.0.5
|
21
|
+
--------------------------------
|
22
|
+
Bug fix release that fixes important issues found since the 1.0.4 release.
|
23
|
+
See full change log at https://issues.apache.org/jira/browse/FTPSERVER/fixforversion/12314821
|
24
|
+
|
25
|
+
1.0.4
|
26
|
+
--------------------------------
|
27
|
+
Bug fix release that fixes important issues found since the 1.0.3 release.
|
28
|
+
See full change log at https://issues.apache.org/jira/browse/FTPSERVER/fixforversion/12314283
|
29
|
+
|
30
|
+
1.0.3
|
31
|
+
--------------------------------
|
32
|
+
Bug fix release that fixes important issues found since the 1.0.2 release.
|
33
|
+
See full change log at https://issues.apache.org/jira/browse/FTPSERVER/fixforversion/12314039
|
34
|
+
|
35
|
+
1.0.2
|
36
|
+
--------------------------------
|
37
|
+
Bug fix release that fixes important issues found since the 1.0.1 release.
|
38
|
+
See full change log at https://issues.apache.org/jira/browse/FTPSERVER/fixforversion/12313952
|
39
|
+
|
40
|
+
1.0.1
|
41
|
+
--------------------------------
|
42
|
+
Bug fix release that fixes important issues found since the 1.0.0 release. https://issues.apache.org/jira/browse/FTPSERVER/fixforversion/12313619
|
43
|
+
|
44
|
+
1.0.0
|
45
|
+
--------------------------------
|
46
|
+
This is the first major release of FtpServer and we now recommend this version
|
47
|
+
for production usage. The release contains a few minor bug fixes found since the
|
48
|
+
last release candidate.
|
49
|
+
|
50
|
+
1.0.0-RC2
|
51
|
+
--------------------------------
|
52
|
+
The release contains fixes to a small set of bugs found in 1.0.0-RC1.
|
53
|
+
|
54
|
+
1.0.0-RC1
|
55
|
+
--------------------------------
|
56
|
+
This release focuses on stabilizing the code base and fixing reported bugs. No major
|
57
|
+
additions or other improvements was included in this version.
|
58
|
+
|
59
|
+
1.0.0-M4
|
60
|
+
--------------------------------
|
61
|
+
The FtpServer API is now stabilized for the upcoming 1.0.0 release. The release
|
62
|
+
also contains a large number of bug fixes and minor improvements as well as
|
63
|
+
complete Javadoc documentation for our API.
|
64
|
+
|
65
|
+
1.0.0-M3
|
66
|
+
--------------------------------
|
67
|
+
This release fixes a number of bugs found since the release of 1.0.0-M2.
|
68
|
+
We have also made some major improvements, especially to Ftplets which are now
|
69
|
+
able to intercept any FTP command.
|
70
|
+
|
71
|
+
1.0.0-M2
|
72
|
+
--------------------------------
|
73
|
+
This is the very first release of Apache FtpServer.
|
@@ -0,0 +1,22 @@
|
|
1
|
+
REM Licensed to the Apache Software Foundation (ASF) under one
|
2
|
+
REM or more contributor license agreements. See the NOTICE file
|
3
|
+
REM distributed with this work for additional information
|
4
|
+
REM regarding copyright ownership. The ASF licenses this file
|
5
|
+
REM to you under the Apache License, Version 2.0 (the
|
6
|
+
REM "License"); you may not use this file except in compliance
|
7
|
+
REM with the License. You may obtain a copy of the License at
|
8
|
+
REM
|
9
|
+
REM http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
REM
|
11
|
+
REM Unless required by applicable law or agreed to in writing,
|
12
|
+
REM software distributed under the License is distributed on an
|
13
|
+
REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
REM KIND, either express or implied. See the License for the
|
15
|
+
REM specific language governing permissions and limitations
|
16
|
+
REM under the License.
|
17
|
+
|
18
|
+
If %OS%'==Windows_NT' Set NTSwitch=/F "Tokens=*"
|
19
|
+
If %OS%'==WINNT' Set NTSwitch=/F "Tokens=*"
|
20
|
+
For %NTSwitch% %%V In (%1) Do set FTPD_CLASSPATH=%FTPD_CLASSPATH%;%%V
|
21
|
+
|
22
|
+
|
@@ -0,0 +1,63 @@
|
|
1
|
+
@echo off
|
2
|
+
|
3
|
+
REM Licensed to the Apache Software Foundation (ASF) under one
|
4
|
+
REM or more contributor license agreements. See the NOTICE file
|
5
|
+
REM distributed with this work for additional information
|
6
|
+
REM regarding copyright ownership. The ASF licenses this file
|
7
|
+
REM to you under the Apache License, Version 2.0 (the
|
8
|
+
REM "License"); you may not use this file except in compliance
|
9
|
+
REM with the License. You may obtain a copy of the License at
|
10
|
+
REM
|
11
|
+
REM http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
REM
|
13
|
+
REM Unless required by applicable law or agreed to in writing,
|
14
|
+
REM software distributed under the License is distributed on an
|
15
|
+
REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
16
|
+
REM KIND, either express or implied. See the License for the
|
17
|
+
REM specific language governing permissions and limitations
|
18
|
+
REM under the License.
|
19
|
+
|
20
|
+
|
21
|
+
if "%OS%"=="Windows_NT" @setlocal
|
22
|
+
if "%OS%"=="WINNT" @setlocal
|
23
|
+
|
24
|
+
REM ==== START VALIDATION ====
|
25
|
+
if not "%JAVA_HOME%" == "" goto OkJHome
|
26
|
+
|
27
|
+
echo.
|
28
|
+
echo ERROR: JAVA_HOME not found in your environment.
|
29
|
+
echo Please set the JAVA_HOME variable in your environment to match the
|
30
|
+
echo location of your Java installation
|
31
|
+
echo.
|
32
|
+
goto error
|
33
|
+
|
34
|
+
:OkJHome
|
35
|
+
if exist "%JAVA_HOME%\bin\java.exe" goto setFtpHome
|
36
|
+
|
37
|
+
echo.
|
38
|
+
echo ERROR: JAVA_HOME is set to an invalid directory.
|
39
|
+
echo JAVA_HOME = %JAVA_HOME%
|
40
|
+
echo Please set the JAVA_HOME variable in your environment to match the
|
41
|
+
echo location of your Java installation
|
42
|
+
echo.
|
43
|
+
goto error
|
44
|
+
|
45
|
+
:setFtpHome
|
46
|
+
|
47
|
+
rem ----- use the location of this script to infer $FTPD_HOME -------
|
48
|
+
if NOT "%OS%"=="Windows_NT" set DEFAULT_FTPD_HOME=..
|
49
|
+
if "%OS%"=="Windows_NT" set DEFAULT_FTPD_HOME=%~dp0\..
|
50
|
+
if "%OS%"=="WINNT" set DEFAULT_FTPD_HOME=%~dp0\..
|
51
|
+
if "%FTPD_HOME%"=="" set FTPD_HOME=%DEFAULT_FTPD_HOME%
|
52
|
+
|
53
|
+
rem ----- Create CLASSPATH --------------------------------------------
|
54
|
+
set FTPD_CLASSPATH=%CLASSPATH%;%FTPD_HOME%\common\classes;
|
55
|
+
cd /d "%FTPD_HOME%\common\lib"
|
56
|
+
for %%i in ("*.jar") do call "%FTPD_HOME%\bin\appendcp.bat" "%FTPD_HOME%\common\lib\%%i"
|
57
|
+
cd /d %FTPD_HOME%
|
58
|
+
|
59
|
+
rem ----- call java.. ---------------------------------------------------
|
60
|
+
set MAIN_CLASS=org.apache.ftpserver.main.CommandLine
|
61
|
+
set JAVA_CMD=%JAVA_HOME%\bin\java
|
62
|
+
|
63
|
+
"%JAVA_CMD%" -classpath "%FTPD_CLASSPATH%" %MAIN_CLASS% %*
|
Binary file
|
@@ -0,0 +1,140 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
# Licensed to the Apache Software Foundation (ASF) under one
|
4
|
+
# or more contributor license agreements. See the NOTICE file
|
5
|
+
# distributed with this work for additional information
|
6
|
+
# regarding copyright ownership. The ASF licenses this file
|
7
|
+
# to you under the Apache License, Version 2.0 (the
|
8
|
+
# "License"); you may not use this file except in compliance
|
9
|
+
# with the License. You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing,
|
14
|
+
# software distributed under the License is distributed on an
|
15
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
16
|
+
# KIND, either express or implied. See the License for the
|
17
|
+
# specific language governing permissions and limitations
|
18
|
+
# under the License.
|
19
|
+
|
20
|
+
#
|
21
|
+
# OS specific support. $var _must_ be set to either true or false.
|
22
|
+
#
|
23
|
+
cygwin=false;
|
24
|
+
darwin=false;
|
25
|
+
case "`uname`" in
|
26
|
+
CYGWIN*) cygwin=true ;;
|
27
|
+
Darwin*) darwin=true
|
28
|
+
if [ -z "$JAVA_HOME" ] ; then
|
29
|
+
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
|
30
|
+
fi
|
31
|
+
;;
|
32
|
+
esac
|
33
|
+
|
34
|
+
#
|
35
|
+
# Get the FTPD_HOME variable
|
36
|
+
#
|
37
|
+
if [ -z "$FTPD_HOME" ] ; then
|
38
|
+
# use the location of this script to infer $FTPD_HOME
|
39
|
+
whoami=`basename $0`
|
40
|
+
whereami=`echo $0 | sed -e "s#^[^/]#\`pwd\`/&#"`
|
41
|
+
whereami=`dirname $whereami`
|
42
|
+
|
43
|
+
# Resolve any symlinks of the now absolute path, $whereami
|
44
|
+
realpath_listing=`ls -l $whereami/$whoami`
|
45
|
+
case "$realpath_listing" in
|
46
|
+
*-\>\ /*)
|
47
|
+
realpath=`echo $realpath_listing | sed -e "s#^.*-> ##"`
|
48
|
+
;;
|
49
|
+
*-\>*)
|
50
|
+
realpath=`echo $realpath_listing | sed -e "s#^.*-> #$whereami/#"`
|
51
|
+
;;
|
52
|
+
*)
|
53
|
+
realpath=$whereami/$whoami
|
54
|
+
;;
|
55
|
+
esac
|
56
|
+
FTPD_HOME=`dirname "$realpath"`/..
|
57
|
+
fi
|
58
|
+
|
59
|
+
#
|
60
|
+
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
61
|
+
#
|
62
|
+
if $cygwin ; then
|
63
|
+
[ -n "$FTPD_HOME" ] &&
|
64
|
+
FTPD_HOME=`cygpath --unix "$FTPD_HOME"`
|
65
|
+
[ -n "$JAVA_HOME" ] &&
|
66
|
+
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
67
|
+
fi
|
68
|
+
|
69
|
+
|
70
|
+
#
|
71
|
+
# Get the Java command
|
72
|
+
#
|
73
|
+
if [ -z "$JAVACMD" ] ; then
|
74
|
+
if [ -n "$JAVA_HOME" ] ; then
|
75
|
+
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
76
|
+
# IBM's JDK on AIX uses strange locations for the executables
|
77
|
+
JAVACMD="$JAVA_HOME/jre/sh/java"
|
78
|
+
else
|
79
|
+
JAVACMD="$JAVA_HOME/bin/java"
|
80
|
+
fi
|
81
|
+
else
|
82
|
+
JAVACMD=`which java 2> /dev/null `
|
83
|
+
if [ -z "$JAVACMD" ] ; then
|
84
|
+
JAVACMD=java
|
85
|
+
fi
|
86
|
+
fi
|
87
|
+
fi
|
88
|
+
|
89
|
+
if [ ! -x "$JAVACMD" ] ; then
|
90
|
+
echo "Error: JAVA_HOME is not defined correctly."
|
91
|
+
echo " We cannot execute $JAVACMD"
|
92
|
+
exit 1
|
93
|
+
fi
|
94
|
+
|
95
|
+
|
96
|
+
#
|
97
|
+
# Get the path separator
|
98
|
+
#
|
99
|
+
if [ "$cygwin" = "true" ] ; then
|
100
|
+
S=';'
|
101
|
+
else
|
102
|
+
S=':'
|
103
|
+
fi
|
104
|
+
|
105
|
+
|
106
|
+
#
|
107
|
+
# Build classpath
|
108
|
+
#
|
109
|
+
if [ "$cygwin" = "true" ] ; then
|
110
|
+
FTPD_CLASSPATH=$CLASSPATH$S`cygpath -w $FTPD_HOME/common/classes`
|
111
|
+
else
|
112
|
+
FTPD_CLASSPATH=$CLASSPATH$S$FTPD_HOME/common/classes
|
113
|
+
fi
|
114
|
+
|
115
|
+
for i in $FTPD_HOME/common/lib/*.jar; do
|
116
|
+
if [ "$cygwin" = "true" ] ; then
|
117
|
+
LIB=`cygpath -w $i`
|
118
|
+
else
|
119
|
+
LIB=$i
|
120
|
+
fi
|
121
|
+
|
122
|
+
FTPD_CLASSPATH=$FTPD_CLASSPATH$S$LIB
|
123
|
+
done
|
124
|
+
|
125
|
+
|
126
|
+
#
|
127
|
+
# Execute command
|
128
|
+
#
|
129
|
+
CURR_DIR=`pwd`
|
130
|
+
cd $FTPD_HOME
|
131
|
+
MAIN_CLASS=org.apache.ftpserver.main.CommandLine
|
132
|
+
|
133
|
+
# PATCHED: Start process in background
|
134
|
+
"$JAVACMD" -classpath "$FTPD_CLASSPATH" $MAIN_CLASS $@ &
|
135
|
+
# PATCHED: Write pidfile
|
136
|
+
echo $! > res/ftpd.pid
|
137
|
+
|
138
|
+
RESULT=$?
|
139
|
+
cd $CURR_DIR
|
140
|
+
exit $RESULT
|