├── .gitattributes
├── .gitignore
├── Ipk
├── db47_4.7.25.4.NC-4.1_ar71xx.ipk
├── libdb47_4.7.25.4.NC-4.1_ar71xx.ipk
├── libpam_1.1.8-4_ar71xx.ipk
├── luci-app-vsftpd_git-16.038.38182-cdcdfd2-1_all.ipk
└── vsftpd_2.3.4-1_ar71xx.ipk
├── README.txt
├── Source
├── gpl-3.0.txt
├── luci-dir
│ └── applications
│ │ └── luci-vsftpd
│ │ ├── Makefile
│ │ ├── luasrc
│ │ ├── controller
│ │ │ └── vsftpd.lua
│ │ ├── model
│ │ │ └── cbi
│ │ │ │ └── vsftpd.lua
│ │ └── view
│ │ │ └── vsftpd_status.htm
│ │ ├── po
│ │ └── zh-cn
│ │ │ └── vsftpd.po
│ │ └── root
│ │ └── etc
│ │ └── vsftpd.conf.template
├── op-dir
│ └── feeds
│ │ └── packages
│ │ └── net
│ │ └── vsftpd
│ │ ├── Makefile
│ │ ├── files
│ │ ├── .directory
│ │ ├── vsftpd.conf
│ │ ├── vsftpd.init
│ │ └── vsftpd.pam
│ │ └── patches
│ │ ├── 001-destdir.patch
│ │ ├── 002-find_libs.patch
│ │ ├── 003-chroot.patch
│ │ └── 004-disable-capabilities.patch
└── patch
│ └── vsftpd_pam.patch
└── VERSION.txt
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 | *.sln merge=union
7 | *.csproj merge=union
8 | *.vbproj merge=union
9 | *.fsproj merge=union
10 | *.dbproj merge=union
11 |
12 | # Standard to msysgit
13 | *.doc diff=astextplain
14 | *.DOC diff=astextplain
15 | *.docx diff=astextplain
16 | *.DOCX diff=astextplain
17 | *.dot diff=astextplain
18 | *.DOT diff=astextplain
19 | *.pdf diff=astextplain
20 | *.PDF diff=astextplain
21 | *.rtf diff=astextplain
22 | *.RTF diff=astextplain
23 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #################
2 | ## Eclipse
3 | #################
4 |
5 | *.pydevproject
6 | .project
7 | .metadata
8 | tmp/
9 | *.tmp
10 | *.bak
11 | *.swp
12 | *~.nib
13 | local.properties
14 | .classpath
15 | .settings/
16 | .loadpath
17 |
18 | # External tool builders
19 | .externalToolBuilders/
20 |
21 | # Locally stored "Eclipse launch configurations"
22 | *.launch
23 |
24 | # CDT-specific
25 | .cproject
26 |
27 | # PDT-specific
28 | .buildpath
29 |
30 |
31 | #################
32 | ## Visual Studio
33 | #################
34 |
35 | ## Ignore Visual Studio temporary files, build results, and
36 | ## files generated by popular Visual Studio add-ons.
37 |
38 | # User-specific files
39 | *.suo
40 | *.user
41 | *.sln.docstates
42 |
43 | # Build results
44 |
45 | [Dd]ebug/
46 | [Rr]elease/
47 | x64/
48 | build/
49 | [Bb]in/
50 | [Oo]bj/
51 |
52 | # MSTest test Results
53 | [Tt]est[Rr]esult*/
54 | [Bb]uild[Ll]og.*
55 |
56 | *_i.c
57 | *_p.c
58 | *.ilk
59 | *.meta
60 | *.obj
61 | *.pch
62 | *.pdb
63 | *.pgc
64 | *.pgd
65 | *.rsp
66 | *.sbr
67 | *.tlb
68 | *.tli
69 | *.tlh
70 | *.tmp
71 | *.tmp_proj
72 | *.log
73 | *.vspscc
74 | *.vssscc
75 | .builds
76 | *.pidb
77 | *.log
78 | *.scc
79 |
80 | # Visual C++ cache files
81 | ipch/
82 | *.aps
83 | *.ncb
84 | *.opensdf
85 | *.sdf
86 | *.cachefile
87 |
88 | # Visual Studio profiler
89 | *.psess
90 | *.vsp
91 | *.vspx
92 |
93 | # Guidance Automation Toolkit
94 | *.gpState
95 |
96 | # ReSharper is a .NET coding add-in
97 | _ReSharper*/
98 | *.[Rr]e[Ss]harper
99 |
100 | # TeamCity is a build add-in
101 | _TeamCity*
102 |
103 | # DotCover is a Code Coverage Tool
104 | *.dotCover
105 |
106 | # NCrunch
107 | *.ncrunch*
108 | .*crunch*.local.xml
109 |
110 | # Installshield output folder
111 | [Ee]xpress/
112 |
113 | # DocProject is a documentation generator add-in
114 | DocProject/buildhelp/
115 | DocProject/Help/*.HxT
116 | DocProject/Help/*.HxC
117 | DocProject/Help/*.hhc
118 | DocProject/Help/*.hhk
119 | DocProject/Help/*.hhp
120 | DocProject/Help/Html2
121 | DocProject/Help/html
122 |
123 | # Click-Once directory
124 | publish/
125 |
126 | # Publish Web Output
127 | *.Publish.xml
128 | *.pubxml
129 |
130 | # NuGet Packages Directory
131 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line
132 | #packages/
133 |
134 | # Windows Azure Build Output
135 | csx
136 | *.build.csdef
137 |
138 | # Windows Store app package directory
139 | AppPackages/
140 |
141 | # Others
142 | sql/
143 | *.Cache
144 | ClientBin/
145 | [Ss]tyle[Cc]op.*
146 | ~$*
147 | *~
148 | *.dbmdl
149 | *.[Pp]ublish.xml
150 | *.pfx
151 | *.publishsettings
152 |
153 | # RIA/Silverlight projects
154 | Generated_Code/
155 |
156 | # Backup & report files from converting an old project file to a newer
157 | # Visual Studio version. Backup files are not needed, because we have git ;-)
158 | _UpgradeReport_Files/
159 | Backup*/
160 | UpgradeLog*.XML
161 | UpgradeLog*.htm
162 |
163 | # SQL Server files
164 | App_Data/*.mdf
165 | App_Data/*.ldf
166 |
167 | #############
168 | ## Windows detritus
169 | #############
170 |
171 | # Windows image file caches
172 | Thumbs.db
173 | ehthumbs.db
174 |
175 | # Folder config file
176 | Desktop.ini
177 |
178 | # Recycle Bin used on file shares
179 | $RECYCLE.BIN/
180 |
181 | # Mac crap
182 | .DS_Store
183 |
184 |
185 | #############
186 | ## Python
187 | #############
188 |
189 | *.py[co]
190 |
191 | # Packages
192 | *.egg
193 | *.egg-info
194 | dist/
195 | build/
196 | eggs/
197 | parts/
198 | var/
199 | sdist/
200 | develop-eggs/
201 | .installed.cfg
202 |
203 | # Installer logs
204 | pip-log.txt
205 |
206 | # Unit test / coverage reports
207 | .coverage
208 | .tox
209 |
210 | #Translations
211 | *.mo
212 |
213 | #Mr Developer
214 | .mr.developer.cfg
215 |
--------------------------------------------------------------------------------
/Ipk/db47_4.7.25.4.NC-4.1_ar71xx.ipk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/animefansxj/luci-app-vsftpd/257b3d8321a9981a8d37ce17266c46b636174e7b/Ipk/db47_4.7.25.4.NC-4.1_ar71xx.ipk
--------------------------------------------------------------------------------
/Ipk/libdb47_4.7.25.4.NC-4.1_ar71xx.ipk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/animefansxj/luci-app-vsftpd/257b3d8321a9981a8d37ce17266c46b636174e7b/Ipk/libdb47_4.7.25.4.NC-4.1_ar71xx.ipk
--------------------------------------------------------------------------------
/Ipk/libpam_1.1.8-4_ar71xx.ipk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/animefansxj/luci-app-vsftpd/257b3d8321a9981a8d37ce17266c46b636174e7b/Ipk/libpam_1.1.8-4_ar71xx.ipk
--------------------------------------------------------------------------------
/Ipk/luci-app-vsftpd_git-16.038.38182-cdcdfd2-1_all.ipk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/animefansxj/luci-app-vsftpd/257b3d8321a9981a8d37ce17266c46b636174e7b/Ipk/luci-app-vsftpd_git-16.038.38182-cdcdfd2-1_all.ipk
--------------------------------------------------------------------------------
/Ipk/vsftpd_2.3.4-1_ar71xx.ipk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/animefansxj/luci-app-vsftpd/257b3d8321a9981a8d37ce17266c46b636174e7b/Ipk/vsftpd_2.3.4-1_ar71xx.ipk
--------------------------------------------------------------------------------
/README.txt:
--------------------------------------------------------------------------------
1 | luci-app-vsftpd
2 | =================================================
3 | VERSION 5.0
4 |
5 | 简述:
6 | 该软件包用于向OpenWRT提供一个基于LuCI的VSFTPD
7 | 控制页面,该页面允许对VSFTPD进行常规参数以及用户
8 | 控制的设置。
9 |
10 |
11 | 测试环境:
12 | 在 OpenWRT 15.05.1 上开发并测试通过
13 |
14 |
15 | 依赖关系:
16 | vsftpd libpam libdb47 db47
17 |
18 |
19 | 作者:
20 | 穿越蓝天 (animefans_xj / 穿越蓝天)
21 | 你可以在这里找到我:
22 | 数码之家 bbs.mydigit.cn
23 | 恩山论坛 www.right.com.cn
24 | 也可以通过电邮反馈:
25 | af_xj@hotmail.cn
26 | xujun@smm.cn
27 |
28 |
29 | 授权:
30 | 此程序的当前版本采用GNU GPL V3协议授权,请务
31 | 必保持分支版本的代码公开。
32 | 你可以在 http://www.gnu.org/licenses/licenses.html
33 | 取得授权协议的副本。
34 |
35 |
36 | 发布:
37 | 除上述站点外,所有资源也通过github以及以下站
38 | 点发布:
39 | http://pan.baidu.com/s/1bnw7hCj#path=%252FSoftware%252FRouter
40 |
--------------------------------------------------------------------------------
/Source/gpl-3.0.txt:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/Source/luci-dir/applications/luci-vsftpd/Makefile:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2008-2014 The LuCI Team
3 | #
4 | # This is free software, licensed under the Apache License, Version 2.0 .
5 | #
6 |
7 | include $(TOPDIR)/rules.mk
8 |
9 | LUCI_TITLE:=LuCI Support for Vsftpd
10 | LUCI_DEPENDS:=+vsftpd
11 |
12 | include ../../luci.mk
13 |
14 | # call BuildPackage - OpenWrt buildroot signature
15 |
--------------------------------------------------------------------------------
/Source/luci-dir/applications/luci-vsftpd/luasrc/controller/vsftpd.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | LuCI - Lua Configuration Interface - vsftpd support
3 |
4 | Script by Admin @ NVACG.org (af_xj@hotmail.com , xujun@smm.cn)
5 | Some codes is based on luci-app-upnp, TKS.
6 | The Author of luci-app-upnp is Steven Barth and Jo-Philipp Wich
7 |
8 | Licensed under the GPL License, Version 3.0 (the "license");
9 | you may not use this file except in compliance with the License.
10 | you may obtain a copy of the License at
11 |
12 | http://www.gnu.org/licenses/gpl.txt
13 |
14 | $Id$
15 | ]]--
16 |
17 | module("luci.controller.vsftpd",package.seeall)
18 |
19 | function index()
20 | require("luci.i18n")
21 | luci.i18n.loadc("vsftpd")
22 | if not nixio.fs.access("/etc/config/vsftpd") then
23 | return
24 | end
25 |
26 | local page = entry({"admin","services","vsftpd"},cbi("vsftpd"),_("FTP Service"))
27 | page.i18n="vsftpd"
28 | page.dependent=true
29 |
30 | entry({"admin","services","vsftpd","status"}, call("connection_status")).leaf = true
31 | end
32 |
33 | function connection_status()
34 | local cmd = io.popen("ps | grep vsftpd | grep -v grep | grep -v IDLE")
35 | if cmd then
36 | local conn = { }
37 | while true do
38 | local ln = cmd:read("*l")
39 | if not ln then
40 | break
41 | elseif ln:match("^.%d+.-%d+.%d+.%d+.%d+:.[a-z]+") then
42 | local num,ip,act = ln:match("^.(%d+).-(%d+.%d+.%d+.%d+):.([a-z]+)")
43 | if num and ip and act then
44 | num = tonumber(num)
45 | conn[#conn+1]= {
46 | num = num,
47 | ip = ip,
48 | user = "",
49 | act = act:upper(),
50 | file = ""
51 | }
52 | end
53 |
54 | elseif ln:match("^.%d+.-%d+.%d+.%d+.%d+/%w+:.%a+.[%w%p]+") then
55 | local num,ip,user,act,file = ln:match("^.(%d+).-(%d+.%d+.%d+.%d+)/(%w+):.(%u+).([%w%p]+)")
56 | if num and ip and act then
57 | num = tonumber(num)
58 | conn[#conn+1]= {
59 | num = num,
60 | ip = ip,
61 | user = user,
62 | act = act,
63 | file = file
64 | }
65 | end
66 | end
67 | end
68 |
69 | cmd:close()
70 | luci.http.prepare_content("application/json")
71 | luci.http.write_json(conn)
72 | end
73 | end
74 |
--------------------------------------------------------------------------------
/Source/luci-dir/applications/luci-vsftpd/luasrc/model/cbi/vsftpd.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | LuCI - Lua Configuration Interface - vsftpd support
3 |
4 | Script by Admin @ NVACG.org (af_xj@hotmail.com , xujun@smm.cn)
5 | Some codes is based on luci-app-upnp, TKS.
6 | The Author of luci-app-upnp is Steven Barth and Jo-Philipp Wich
7 |
8 | Licensed under the GPL License, Version 3.0 (the "license");
9 | you may not use this file except in compliance with the License.
10 | you may obtain a copy of the License at
11 |
12 | http://www.gnu.org/licenses/gpl.txt
13 |
14 | $Id$
15 | ]]--
16 |
17 | require("luci.sys")
18 | require("luci.util")
19 |
20 | local running=(luci.sys.call("pidof vsftpd > /dev/null") == 0)
21 |
22 | m=Map("vsftpd",translate("FTP Service"),translate("Use this page, you can share your file under web via ftp."))
23 |
24 | s=m:section(TypedSection,"vsftpd",translate("vsFTPd Settings"))
25 | s.addremove=false
26 | s.anonymous=true
27 |
28 | v=m:section(TypedSection,"guests",translate("Virtual User List"))
29 | v.addremove=true
30 | v.anonymous=true
31 | v.template="cbi/tblsection"
32 | v.sortable=false
33 |
34 | gst_enable=v:option(Flag,"enable",translate("Enable"))
35 | gst_enable.default=1
36 | gst_user=v:option(Value,"user",translate("User Name"))
37 | gst_user.rmempty=false
38 | gst_pass=v:option(Value,"pass",translate("Password"))
39 | gst_pass.rmempty=false
40 | gst_root=v:option(Value,"root",translate("Root dir"))
41 | gst_root.default="/tmp/none"
42 | gst_root.rmempty=false
43 | gst_umask=v:option(Value,"umask",translate("uMask"))
44 | gst_umask.default="022"
45 | gst_umask.datatype="range(0,777)"
46 | gst_umask.rmempty=false
47 | gst_umask:value("000","000")
48 | gst_umask:value("022","022")
49 | gst_umask:value("027","027")
50 | gst_speed=v:option(Value,"speed",translate("Speed Limit"))
51 | gst_speed.default=0
52 | gst_speed.rmempty=0
53 | gst_speed.placeholder=translate("In KB/s. 0 means unlimited.")
54 | gst_speed.datatype="range(0,128000)"
55 | gst_speed:value("0",translate("Unlimit"))
56 | gst_speed:value("64","64")
57 | gst_speed:value("128","128")
58 | gst_speed:value("256","256")
59 | gst_speed:value("512","512")
60 | gst_speed:value("1024","1024")
61 | gst_speed:value("2048","2048")
62 | gst_down=v:option(Flag,"download",translate("Download"))
63 | gst_down.default=1
64 | gst_up=v:option(Flag,"upload",translate("Upload"))
65 | gst_up.default=0
66 | gst_chown=v:option(Flag,"chown",translate("Chown"))
67 | gst_chown.default=0
68 |
69 |
70 |
71 | m:section(SimpleSection).template="vsftpd_status"
72 |
73 | s:tab("general",translate("Global"))
74 | s:tab("localuser",translate("Local User"))
75 | s:tab("virtualuser",translate("Virtual User"))
76 | s:tab("anonymous",translate("Anonymous"))
77 | s:tab("userlist",translate("User List"))
78 | s:tab("template",translate("Template"))
79 |
80 |
81 |
82 | enable=s:taboption("general",Flag,"enabled",translate("Enabled"))
83 | enable.rmempty=false
84 | function enable.cfgvalue(self,section)
85 | return luci.sys.init.enabled("vsftpd") and self.enabled or self.disabled
86 | end
87 | function enable.write(self,section,value)
88 | if value == "1" then
89 | if running then
90 | luci.sys.call("/etc/init.d/vsftpd stop >/dev/null")
91 | end
92 | luci.sys.call("/etc/init.d/vsftpd enable >/dev/null")
93 | luci.sys.call("/etc/init.d/vsftpd start >/dev/null")
94 | else
95 | luci.sys.call("/etc/init.d/vsftpd stop >/dev/null")
96 | luci.sys.call("/etc/init.d/vsftpd disable >/dev/null")
97 | end
98 | end
99 | listen_ipv6=s:taboption("general",Flag,"listen_ipv6",translate("Allow IPv6"))
100 | listen_ipv6.rmempty=false
101 | banner=s:taboption("general",Value,"ftpd_banner",translate("FTP banner"))
102 | banner.rmempty=true
103 | banner.placeholder="OpenWRT Router Embd FTP service."
104 | max_clients=s:taboption("general",Value,"max_clients",translate("Max number of clients"))
105 | max_clients:value("5","5")
106 | max_clients:value("10","10")
107 | max_clients:value("15","15")
108 | max_clients:value("20","20")
109 | max_clients.placeholder="10"
110 | max_clients.datatype="range(1,100)"
111 | max_clients.rmempty=true
112 | max_per_ip=s:taboption("general",Value,"max_per_ip",translate("Max threads of per ip"))
113 | max_per_ip:value("1","1")
114 | max_per_ip:value("2","2")
115 | max_per_ip:value("3","3")
116 | max_per_ip:value("4","4")
117 | max_per_ip:value("5","5")
118 | max_per_ip.placeholder="5"
119 | max_per_ip.datatype="range(1,10)"
120 | max_per_ip.rmempty=true
121 | ascii=s:taboption("general",ListValue,"ascii",translate("ASCII availabled"))
122 | ascii:value("both",translate("Both Download and Upload"))
123 | ascii:value("download",translate("Download only"))
124 | ascii:value("upload",translate("Upload only"))
125 | ascii:value("none",translate("None"))
126 | port_20=s:taboption("general",Flag,"connect_from_port_20",translate("Data Port using 20"))
127 | port_20.rmempty=false
128 | pasv_enable=s:taboption("general",Flag,"pasv_enable",translate("Enable Pasv Mode"))
129 | pasv_enable.rmempty=false
130 | pasv_min_port=s:taboption("general",Value,"pasv_min_port",translate("Pasv Min Port"))
131 | pasv_min_port.rmempty=true
132 | pasv_min_port.placeholder="1024"
133 | pasv_min_port.datatype="range(1024,65535)"
134 | pasv_min_port:depends("pasv_enable",1)
135 | pasv_max_port=s:taboption("general",Value,"pasv_max_port",translate("Pasv Max Port"))
136 | pasv_max_port.rmempty=true
137 | pasv_max_port.placeholder="65535"
138 | pasv_max_port.datatype="range(1024,65535)"
139 | pasv_max_port:depends("pasv_enable",1)
140 | async_abor=s:taboption("general",Flag,"async_abor_enable",translate("Accept Special Cmd"))
141 | async_abor.rmempty=false
142 | ls_recurse=s:taboption("general",Flag,"ls_recurse_enable",translate("Allow exhaustive listing"))
143 | ls_recurse.rmempty=false
144 | dirmessage=s:taboption("general",Flag,"dirmessage_enable",translate("Enable DIR Message"))
145 | dirmessage.rmempty=false
146 | idle_timeout=s:taboption("general",Value,"idle_session_timeout",translate("Idle timeout"))
147 | idle_timeout.rmempty=false
148 | idle_timeout.placeholder="600"
149 | transfer_timeout=s:taboption("general",Value,"data_connection_timeout",translate("Transfer timeout"))
150 | transfer_timeout.rmempty=false
151 | transfer_timeout.placeholder="200"
152 | xferlog=s:taboption("general",Flag,"xferlog_enable",translate("Enable FTP Logging"))
153 | xferlog.rmempty=false
154 | log_path=s:taboption("general",Value,"log_path",translate("Log Path"))
155 | log_path.rmempty=true
156 | log_path.placeholder="/tmp/log/vsftpd.log"
157 | log_path:depends("xferlog_enable",1)
158 | proctitle=s:taboption("general",Flag,"proctitle_enable",translate("Monitor FTP session"))
159 | proctitle.rmempty=false
160 |
161 | local_enabled=s:taboption("localuser",Flag,"local_enable",translate("Allow local member"))
162 | local_enabled.rmempty=false
163 | local_write=s:taboption("localuser",Flag,"write_enable",translate("Member can write"))
164 | local_write.rmempty=false
165 | local_write:depends("local_enable",1)
166 | local_chown=s:taboption("localuser",Flag,"chown_uploads",translate("Allow change permissions"))
167 | local_chown.rmempty=false
168 | local_chown:depends("local_enable",1)
169 | local_chroot=s:taboption("localuser",Flag,"chroot_local_user",translate("Enable chroot"))
170 | local_chroot.rmempty=false
171 | local_chroot:depends("local_enable",1)
172 | local_max_rate=s:taboption("localuser",Value,"local_max_rate",translate("Speed limit"),translate("In KB/s. 0 means unlimited."))
173 | local_max_rate:value("0",translate("Unlimit"))
174 | local_max_rate:value("64","64")
175 | local_max_rate:value("128","128")
176 | local_max_rate:value("256","256")
177 | local_max_rate:value("512","512")
178 | local_max_rate:value("1024","1024")
179 | local_max_rate:value("2048","2048")
180 | local_max_rate.placeholder="0"
181 | local_max_rate.datatype="range(0,128000)"
182 | local_max_rate.rmempty=true
183 | local_max_rate:depends("local_enable",1)
184 | local_umask=s:taboption("localuser",Value,"local_umask",translate("uMask for new uploads"),translate("The format for number likes ###, first bit for the file's Master. second bit for the Groups which Master have joined, last bit for other people. Every bit's value from 0 to 7: 4 means read, 2 means write, 1 means execute. The value of a bit is the sigma of above listed value. When a file created, the default value is 777\(that means everyone can read write and execute the file,\) and the vsftpd will deduct the value which you set from default value."))
185 | local_umask.default="022"
186 | local_umask:value("000","000")
187 | local_umask:value("022","022")
188 | local_umask:value("027","027")
189 | local_umask.placeholder="000"
190 | local_umask.datatype="range(0,777)"
191 | local_umask.rmempty=true
192 | local_umask:depends("local_enable",1)
193 |
194 | guest_enabled=s:taboption("virtualuser",Flag,"guest_enable",translate("Enable virtual user"),translate("Enable virtual user will disable local user"))
195 | guest_enabled.rmempty=false
196 | guest_username=s:taboption("virtualuser",Value,"guest_username",translate("Map to local user"))
197 | guest_username.rmempty=true
198 | guest_username.default="ftp"
199 | guest_username:depends("guest_enable",1)
200 | for _, list_user in luci.util.vspairs(luci.util.split(luci.sys.exec("cat /etc/passwd | cut -f 1 -d:"))) do
201 | guest_username:value(list_user)
202 | end
203 |
204 | anon_enabled=s:taboption("anonymous",Flag,"anonymous_enable",translate("Allow anonymous"))
205 | anon_enabled.rmempty=false
206 | anon_upload=s:taboption("anonymous",Flag,"anon_upload_enable",translate("Anonymous can upload"))
207 | anon_upload.rmempty=false
208 | anon_upload:depends("anonymous_enable",1)
209 | anon_mkdir=s:taboption("anonymous",Flag,"anon_mkdir_write_enable",translate("Anonymous can create folder"))
210 | anon_mkdir.rmempty=false
211 | anon_mkdir:depends("anonymous_enable",1)
212 | anon_root=s:taboption("anonymous",Value,"anon_root",translate("Anonymous root"))
213 | anon_root.rmempty=false
214 | anon_max_rate=s:taboption("anonymous",Value,"anon_max_rate",translate("Speed limit"),translate("In KB/s. 0 means unlimited."))
215 | anon_max_rate:value("0","0")
216 | anon_max_rate:value("64","64")
217 | anon_max_rate:value("128","128")
218 | anon_max_rate:value("256","256")
219 | anon_max_rate:value("512","512")
220 | anon_max_rate:value("1024","1024")
221 | anon_max_rate:value("2048","2048")
222 | anon_max_rate.placeholder="0"
223 | anon_max_rate.datatype="range(0,128000)"
224 | anon_max_rate.rmempty=true
225 | anon_max_rate:depends("anonymous_enable",1)
226 | chown_username=s:taboption("anonymous",ListValue,"chown_username",translate("Chown User"))
227 | chown_username:depends("anonymous_enable",1)
228 | for _, list_user in luci.util.vspairs(luci.util.split(luci.sys.exec("cat /etc/passwd | cut -f 1 -d:"))) do
229 | chown_username:value(list_user)
230 | end
231 |
232 | local_userlist=s:taboption("userlist",Flag,"userlist_enable",translate("Enable userlist"))
233 | local_userlist.rmempty=false
234 | local_userlist:depends("local_enable",1)
235 | local_userlist_type=s:taboption("userlist",ListValue,"userlist_type",translate("Userlist control type"))
236 | local_userlist_type:value("allow","allow")
237 | local_userlist_type:value("deny","deny")
238 | list=s:taboption("userlist",DynamicList,"userlist",translate("User"))
239 | for _, list_user in luci.util.vspairs(luci.util.split(luci.sys.exec("cat /etc/passwd | cut -f 1 -d:"))) do
240 | list:value(list_user)
241 | end
242 |
243 | tmpl=s:taboption("template",Value,"_tmpl","",translate("Here,you can edit the template of config file"))
244 | tmpl.template = "cbi/tvalue"
245 | tmpl.rows=20
246 |
247 | function tmpl.cfgvalue(self, section)
248 | return nixio.fs.readfile("/etc/vsftpd.conf.template")
249 | end
250 |
251 | function tmpl.write(self, section, value)
252 | value = value:gsub("\r\n?", "\n")
253 | nixio.fs.writefile("/etc/vsftpd.conf.template", value)
254 | end
255 |
256 |
257 | return m
258 |
--------------------------------------------------------------------------------
/Source/luci-dir/applications/luci-vsftpd/luasrc/view/vsftpd_status.htm:
--------------------------------------------------------------------------------
1 |
38 |
39 |
53 |
--------------------------------------------------------------------------------
/Source/luci-dir/applications/luci-vsftpd/po/zh-cn/vsftpd.po:
--------------------------------------------------------------------------------
1 | msgid ""
2 | msgstr ""
3 | "Report-Msgid-Bugs-To: \n"
4 | "POT-Creation-Date: 2014-03-08 20:45+0800\n"
5 | "PO-Revision-Date: 2014-03-14 21:20+0800\n"
6 | "Last-Translator: 穿越蓝天 < admin@nvacg.com , af_xj@hotmail.com >\n"
7 | "Language: cn\n"
8 | "MIME-Version: 1.0\n"
9 | "Content-Type: text/plain; charset=UTF-8\n"
10 | "Content-Transfer-Encoding: 8bit\n"
11 | "Plural-Forms: nplurals=1; plural=0;\n"
12 | "X-Generator: Poedit 1.5.4\n"
13 | "Project-Id-Version: \n"
14 | "Language-Team: \n"
15 |
16 | msgid "FTP Service"
17 | msgstr "FTP服务器"
18 |
19 | msgid "Use this page, you can share your file under web via ftp."
20 | msgstr "使用此页面配置FTP服务器,在互联网上共享此路由器上的文件."
21 |
22 | msgid "vsFTPd Settings"
23 | msgstr "vsFTPd 设置"
24 |
25 | msgid "Global"
26 | msgstr "全局"
27 |
28 | msgid "Local User"
29 | msgstr "本地用户"
30 |
31 | msgid "Anonymous"
32 | msgstr "匿名用户"
33 |
34 | msgid "User List"
35 | msgstr "用户列表"
36 |
37 | msgid "Template"
38 | msgstr "编辑模板"
39 |
40 | msgid "FTP banner"
41 | msgstr "FTP问候语"
42 |
43 | msgid "Enabled"
44 | msgstr "启用"
45 |
46 | msgid "Max number of clients"
47 | msgstr "最大客户端数量"
48 |
49 | msgid "ASCII availabled"
50 | msgstr "使用ASCII"
51 |
52 | msgid "Data Port using 20"
53 | msgstr "使用20端口传输"
54 |
55 | msgid "Accept Special Cmd"
56 | msgstr "接受特殊指令"
57 |
58 | msgid "Allow exhaustive listing"
59 | msgstr "允许穷举列表"
60 |
61 | msgid "Enable DIR Message"
62 | msgstr "启用目录消息"
63 |
64 | msgid "Idle timeout"
65 | msgstr "空闲超时"
66 |
67 | msgid "Transfer timeout"
68 | msgstr "传输超时"
69 |
70 | msgid "Allow local member"
71 | msgstr "允许本地用户"
72 |
73 | msgid "Member can write"
74 | msgstr "本地用户可写"
75 |
76 | msgid "Allow change permissions"
77 | msgstr "允许更改权限"
78 |
79 | msgid "Enable chroot"
80 | msgstr "仅允许访问主目录"
81 |
82 | msgid "uMask for new uploads"
83 | msgstr "默认的文件掩码"
84 |
85 | msgid "Enable userlist"
86 | msgstr "启用用户列表"
87 |
88 | msgid "Userlist control type"
89 | msgstr "用户列表类型"
90 |
91 | msgid "allow"
92 | msgstr "允许"
93 |
94 | msgid "deny"
95 | msgstr "阻止"
96 |
97 | msgid "Allow anonymous"
98 | msgstr "允许匿名用户"
99 |
100 | msgid "Anonymous can upload"
101 | msgstr "匿名用户可写"
102 |
103 | msgid "Anonymous can create folder"
104 | msgstr "匿名用户可建立目录"
105 |
106 | msgid "Anonymous root"
107 | msgstr "匿名用户根目录"
108 |
109 | msgid "User"
110 | msgstr "用户"
111 |
112 | msgid "Allow IPv6"
113 | msgstr "允许IPv6"
114 |
115 | msgid "Enable FTP Logging"
116 | msgstr "启用FTP日志"
117 |
118 | msgid "Log Path"
119 | msgstr "日志路径"
120 |
121 | msgid "Monitor FTP session"
122 | msgstr "监控FTP会话"
123 |
124 | msgid "Chown User"
125 | msgstr "变更所有者"
126 |
127 | msgid "Active FTP Sessions"
128 | msgstr "活动的FTP会话"
129 |
130 | msgid "IP Address"
131 | msgstr "IP地址"
132 |
133 | msgid "Action"
134 | msgstr "动作"
135 |
136 | msgid "File"
137 | msgstr "文件"
138 |
139 | msgid "CONNECTED"
140 | msgstr "已连接"
141 |
142 | msgid "STOR"
143 | msgstr "存储"
144 |
145 | msgid "RETR"
146 | msgstr "读取"
147 |
148 | msgid "Enable Pasv Mode"
149 | msgstr "启用被动模式"
150 |
151 | msgid "Pasv Min Port"
152 | msgstr "被动模式最小端口"
153 |
154 | msgid "Pasv Max Port"
155 | msgstr "被动模式最大端口"
156 |
157 | msgid "There are no active ftp session."
158 | msgstr "当前没有活动的FTP会话"
159 |
160 | msgid "Max threads of per ip"
161 | msgstr "每IP最大线程数"
162 |
163 | msgid "Speed limit"
164 | msgstr "限速"
165 |
166 | msgid "In KB/s. 0 means unlimited."
167 | msgstr "以KB/s为单位,0表示不限制"
168 |
169 | msgid "The format for number likes ###, first bit for the file's Master. second bit for the Groups which Master have joined, last bit for other people. Every bit's value from 0 to 7: 4 means read, 2 means write, 1 means execute. The value of a bit is the sigma of above listed value. When a file created, the default value is 777(that means everyone can read write and execute the file,) and the vsftpd will deduct the value which you set from default value."
170 | msgstr "由3位8进制数组成. 第一位针对文件的所有者, 第二位针对所有者所在群组的成员, 第三位对应其它用户. 每一位中4代表可读, 2代表可写, 1代表可执行, 将需要的权限值相加得到一位. 新文件的默认权限是777(即所有人可读可写可执行), vsftpd将会从777中扣除你所设定的值."
171 |
172 | msgid "Here,you can edit the template of config file"
173 | msgstr "此处,你可以编辑用以生成配置文件的模板"
174 |
175 | msgid "Both Download and Upload"
176 | msgstr "下载和上传"
177 |
178 | msgid "Download only"
179 | msgstr "仅下载"
180 |
181 | msgid "Upload only"
182 | msgstr "仅上传"
183 |
184 | msgid "Virtual User"
185 | msgstr "虚拟用户"
186 |
187 | msgid "Enable virtual user"
188 | msgstr "启用虚拟用户"
189 |
190 | msgid "Enable virtual user will disable local user"
191 | msgstr "启用虚拟用户将禁用本地用户"
192 |
193 | msgid "Map to local user"
194 | msgstr "映射到本地用户"
195 |
196 | msgid "Virtual User List"
197 | msgstr "虚拟用户列表"
198 |
199 | msgid "User Name"
200 | msgstr "用户名"
201 |
202 | msgid "Password"
203 | msgstr "密码"
204 |
205 | msgid "Root dir"
206 | msgstr "根目录"
207 |
208 | msgid "uMask"
209 | msgstr "掩码"
210 |
211 | msgid "Speed Limit"
212 | msgstr "限速"
213 |
214 | msgid "Download"
215 | msgstr "下载"
216 |
217 | msgid "Upload"
218 | msgstr "上传"
219 |
220 | msgid "Chown"
221 | msgstr "更改所有者"
222 |
223 | msgid "Unlimit"
224 | msgstr "不限"
225 |
--------------------------------------------------------------------------------
/Source/luci-dir/applications/luci-vsftpd/root/etc/vsftpd.conf.template:
--------------------------------------------------------------------------------
1 | background=YES
2 | max_clients=|MAX_CLIENTS|
3 | listen=YES
4 | # Low version's vsftpd not support ipv6
5 | # listen_ipv6=|LISTEN_IPV6|
6 | pasv_enable=|PASV_ENABLE|
7 | max_per_ip=|MAX_PER_IP|
8 |
9 | ########## connection config ##########
10 | connect_from_port_20=|CONNECT_FROM_PORT_20|
11 | async_abor_enable=|ASYNC_ABOR_ENABLE|
12 | ls_recurse_enable=|LS_RECURSE_ENABLE|
13 | ascii_download_enable=|ASCII_DOWNLOAD_ENABLE|
14 | ascii_upload_enable=|ASCII_UPLOAD_ENABLE|
15 | idle_session_timeout=|IDLE_SESSION_TIMEOUT|
16 | data_connection_timeout=|DATA_CONNECTION_TIMEOUT|
17 |
18 | ########## anonymous config ##########
19 | anonymous_enable=|ANONYMOUS_ENABLE|
20 | anon_upload_enable=|ANON_UPLOAD_ENABLE|
21 | anon_mkdir_write_enable=|ANON_MKDIR_WRITE_ENABLE|
22 | anon_root=|ANON_ROOT|
23 |
24 | ########## config for local user ##########
25 | local_enable=|LOACL_ENABLE|
26 | write_enable=|WRITE_ENABLE|
27 | local_umask=|LOCAL_UMASK|
28 |
29 | chown_uploads=|CHOWN_UPLOADS|
30 | chroot_local_user=|CHROOT_LOCAL_USER|
31 |
32 | check_shell=NO
33 | dirmessage_enable=|DIRMESSAGE_ENABLE|
34 | ftpd_banner=|FTPD_BANNER|
35 | session_support=NO
36 | userlist_enable=|USERLIST_ENABLE|
37 | userlist_deny=|USERLIST_DENY|
38 | userlist_file=/var/etc/vsftpd/users.txt
39 |
40 | ########## misc config ##########
41 | #syslog_enable=YES
42 | xferlog_enable=|XFERLOG_ENABLE|
43 | xferlog_file=|LOG_PATH|
44 | setproctitle_enable=|PROCTITLE_ENABLE|
45 |
46 | ########## config for virtual user ##########
47 | guest_enable=|GUEST_ENABLE|
48 | pam_service_name=vsftpd
49 | guest_username=|GUEST_USERNAME|
50 | virtual_use_local_privs=YES
51 | user_config_dir=/var/etc/vsftpd/vconfig
52 |
53 | ########## addition config ##########
54 |
--------------------------------------------------------------------------------
/Source/op-dir/feeds/packages/net/vsftpd/Makefile:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2006-2012 OpenWrt.org
3 | #
4 | # This is free software, licensed under the GNU General Public License v2.
5 | # See /LICENSE for more information.
6 | #
7 |
8 | include $(TOPDIR)/rules.mk
9 |
10 | PKG_NAME:=vsftpd
11 | PKG_VERSION:=2.3.4
12 | PKG_RELEASE:=1
13 |
14 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 | PKG_SOURCE_URL:=https://security.appspot.com/downloads/
16 | PKG_MD5SUM:=2ea5d19978710527bb7444d93b67767a
17 |
18 | include $(INCLUDE_DIR)/package.mk
19 |
20 | define Package/vsftpd
21 | SUBMENU:=File Transfer
22 | SECTION:=net
23 | CATEGORY:=Network
24 | DEPENDS:=+libpam +db47
25 | TITLE:=A fast and secure FTP server
26 | URL:=http://vsftpd.beasts.org/
27 | MAINTAINER:=Cezary Jackiewicz
28 | endef
29 |
30 | define Package/vsftpd/conffiles
31 | /etc/vsftpd.conf
32 | endef
33 |
34 | define Build/Compile
35 | $(MAKE) -C $(PKG_BUILD_DIR) \
36 | CC="$(TARGET_CC)" \
37 | CFLAGS="$(TARGET_CFLAGS)" \
38 | LDFLAGS="$(TARGET_LDFLAGS)" \
39 | vsftpd
40 | endef
41 |
42 | define Package/vsftpd/install
43 | $(INSTALL_DIR) $(1)/usr/sbin
44 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
45 | $(INSTALL_DIR) $(1)/etc/config
46 | $(INSTALL_CONF) files/$(PKG_NAME).conf $(1)/etc/config/$(PKG_NAME)
47 | $(INSTALL_DIR) $(1)/etc/init.d
48 | $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
49 | $(INSTALL_DIR) $(1)/etc/pam.d
50 | $(INSTALL_CONF) files/$(PKG_NAME).pam $(1)/etc/pam.d/$(PKG_NAME)
51 | endef
52 |
53 | $(eval $(call BuildPackage,vsftpd))
54 |
--------------------------------------------------------------------------------
/Source/op-dir/feeds/packages/net/vsftpd/files/.directory:
--------------------------------------------------------------------------------
1 | [Dolphin]
2 | Timestamp=2016,4,24,16,21,55
3 | Version=3
4 |
5 | [Settings]
6 | HiddenFilesShown=true
7 |
--------------------------------------------------------------------------------
/Source/op-dir/feeds/packages/net/vsftpd/files/vsftpd.conf:
--------------------------------------------------------------------------------
1 |
2 | config vsftpd 'main'
3 | option enabled '0'
4 | option local_enable '1'
5 | option write_enable '1'
6 | option chown_uploads '1'
7 | option local_umask '022'
8 | option anonymous_enable '0'
9 | option max_clients '10'
10 | option userlist_type 'allow'
11 | list userlist 'ftp'
12 | option ftpd_banner 'OpenWRT Router Embd FTP service.'
13 | option ascii 'both'
14 | option idle_session_timeout '600'
15 | option data_connection_timeout '200'
16 | option connect_from_port_20 '0'
17 | option async_abor_enable '0'
18 | option ls_recurse_enable '0'
19 | option dirmessage_enable '0'
20 | option userlist_enable '0'
21 | option anon_root '/tmp'
22 | option chroot_local_user '0'
23 | option proctitle_enable '1'
24 | option listen_ipv6 '1'
25 | option pasv_enable '1'
26 | option xferlog_enable '1'
27 | option max_per_ip '5'
28 | option local_max_rate '0'
29 | option guest_enable '0'
30 |
31 |
--------------------------------------------------------------------------------
/Source/op-dir/feeds/packages/net/vsftpd/files/vsftpd.init:
--------------------------------------------------------------------------------
1 | #!/bin/sh /etc/rc.common
2 | # Copyright (C) 2006-2011 OpenWrt.org
3 |
4 | START=50
5 |
6 | mkuserlist() {
7 | echo $1 >> /var/etc/vsftpd/users.txt
8 | }
9 |
10 | mkvconfig() {
11 | config_get enable $1 enable
12 | config_get user $1 user
13 | config_get pass $1 pass
14 | config_get root $1 root
15 | config_get umask $1 umask
16 | config_get speed $1 speed
17 | config_get download $1 download
18 | config_get upload $1 upload
19 | config_get chown $1 chown
20 |
21 | if [ $enable ]; then
22 | echo "$user" >> /var/etc/vsftpd/virtual
23 | echo "$pass" >> /var/etc/vsftpd/virtual
24 |
25 | if [ $download -eq 1 ]; then
26 | echo "download_enable=YES" >> /var/etc/vsftpd/vconfig/$user
27 | else
28 | echo "download_enable=NO" >> /var/etc/vsftpd/vconfig/$user
29 | fi
30 |
31 | if [ $upload -eq 1 ]; then
32 | echo "write_enable=YES" >> /var/etc/vsftpd/vconfig/$user
33 | else
34 | echo "write_enable=NO" >> /var/etc/vsftpd/vconfig/$user
35 | fi
36 |
37 | if [ $chown -eq 1 ]; then
38 | echo "chown_uploads=YES" >> /var/etc/vsftpd/vconfig/$user
39 | else
40 | echo "chown_uploads=NO" >> /var/etc/vsftpd/vconfig/$user
41 | fi
42 |
43 | echo "local_root=$root" >> /var/etc/vsftpd/vconfig/$user
44 | echo "local_umask=$umask" >> /var/etc/vsftpd/vconfig/$user
45 |
46 | if [ $speed -ne 0 ]; then
47 | let speed*=1024
48 | echo "local_max_rate=$speed" >> /var/etc/vsftpd/vconfig/$user
49 | fi
50 |
51 | fi
52 | }
53 |
54 | start() {
55 |
56 | config_load "vsftpd"
57 |
58 | local enabled ftpd_banner max_clients local_enable write_enable chown_uploads chroot_local_user local_umask
59 | local userlist_enable userlist_type anonymous_enable anon_upload_enable anon_mkdir_write_enable userlist
60 | ########## Since Ver 2.0 ##########
61 | local dirmessage_enable connect_from_port_20 idle_session_timeout data_connection_timeout async_abor_enable
62 | local ascii ls_recurse_enable ascii_download ascii_upload
63 | ########## Since Ver 4.0 ##########
64 | local proctitle_enable xferlog_enable log_path chown_username listen_ipv6 pasv_enable pasv_min_port
65 | local pasv_max_port max_per_ip local_max_rate anon_max_rate
66 | ########## Since Ver 5.0 ##########
67 | local guest_enable guest_username
68 |
69 | config_get enabled main enabled
70 | config_get ftpd_banner main ftpd_banner
71 | config_get max_clients main max_clients
72 | config_get local_enable main local_enable
73 | config_get write_enable main write_enable
74 | config_get chown_uploads main chown_uploads
75 | config_get chroot_local_user main chroot_local_user
76 | config_get local_umask main local_umask
77 | config_get userlist_enable main userlist_enable
78 | config_get userlist_type main userlist_type
79 | config_get anonymous_enable main anonymous_enable
80 | config_get anon_upload_enable main anon_upload_enable
81 | config_get anon_mkdir_write_enable main anon_mkdir_write_enable
82 | ########## Since Ver 2.0 ##########
83 | config_get dirmessage_enable main dirmessage_enable
84 | config_get connect_from_port_20 main connect_from_port_20
85 | config_get idle_session_timeout main idle_session_timeout
86 | config_get data_connection_timeout main data_connection_timeout
87 | config_get async_abor_enable main async_abor_enable
88 | config_get ascii main ascii
89 | config_get ls_recurse_enable main ls_recurse_enable
90 | ########## Since Ver 3.0 ##########
91 | config_get anon_root main anon_root
92 | ########## Since Ver 4.0 ##########
93 | config_get proctitle_enable main proctitle_enable
94 | config_get xferlog_enable main xferlog_enable
95 | config_get log_path main log_path
96 | config_get chown_username main chown_username
97 | config_get listen_ipv6 main listen_ipv6
98 | config_get pasv_enable main pasv_enable
99 | config_get pasv_min_port main pasv_min_port
100 | config_get pasv_max_port main pasv_max_port
101 | config_get max_per_ip main max_per_ip
102 | config_get local_max_rate main local_max_rate
103 | config_get anon_max_rate main anon_max_rate
104 | ########## Since Ver 5.0 ##########
105 | config_get guest_enable main guest_enable
106 | config_get guest_username main guest_username
107 |
108 | local userlist_deny
109 |
110 | if [ $anonymous_enable -eq 1 ]; then
111 | anonymous_enable="YES"
112 | else
113 | anonymous_enable="NO"
114 | fi
115 |
116 | if [ $anon_upload_enable -eq 1 ]; then
117 | anon_upload_enable="YES"
118 | else
119 | anon_upload_enable="NO"
120 | fi
121 |
122 | if [ $anon_mkdir_write_enable -eq 1 ]; then
123 | anon_mkdir_write_enable="YES"
124 | else
125 | anon_mkdir_write_enable="NO"
126 | fi
127 |
128 | if [ $local_enable -eq 1 ]; then
129 | local_enable="YES"
130 | else
131 | local_enable="NO"
132 | fi
133 |
134 | if [ $write_enable -eq 1 ]; then
135 | write_enable="YES"
136 | else
137 | write_enable="NO"
138 | fi
139 |
140 | if [ $chown_uploads -eq 1 ]; then
141 | chown_uploads="YES"
142 | else
143 | chown_uploads="NO"
144 | fi
145 |
146 | if [ $chroot_local_user -eq 1 ]; then
147 | chroot_local_user="YES"
148 | else
149 | chroot_local_user="NO"
150 | fi
151 |
152 | if [ $userlist_enable -eq 1 ]; then
153 | userlist_enable="YES"
154 | else
155 | userlist_enable="NO"
156 | fi
157 |
158 | if [ $userlist_type == "allow" ]; then
159 | userlist_deny="NO"
160 | else
161 | userlist_deny="YES"
162 | fi
163 |
164 | if [ ! $local_umask ]; then
165 | local_umask="022"
166 | fi
167 |
168 | ########## Since Ver 2.0 ##########
169 | if [ $dirmessage_enable -eq 1 ]; then
170 | dirmessage_enable="YES"
171 | else
172 | dirmessage_enable="NO"
173 | fi
174 |
175 | if [ $connect_from_port_20 -eq 1 ]; then
176 | connect_from_port_20="YES"
177 | else
178 | connect_from_port_20="NO"
179 | fi
180 |
181 | if [ $async_abor_enable -eq 1 ]; then
182 | async_abor_enable="YES"
183 | else
184 | async_abor_enable="NO"
185 | fi
186 |
187 | if [ $ls_recurse_enable -eq 1 ]; then
188 | ls_recurse_enable="YES"
189 | else
190 | ls_recurse_enable="NO"
191 | fi
192 |
193 | case $ascii in
194 | "both")
195 | ascii_download="YES"
196 | ascii_upload="YES"
197 | ;;
198 | "download")
199 | ascii_download="YES"
200 | ascii_upload="NO"
201 | ;;
202 | "upload")
203 | ascii_download="NO"
204 | ascii_upload="YES"
205 | ;;
206 | "none")
207 | ascii_download="NO"
208 | ascii_upload="NO"
209 | ;;
210 | *)
211 | ascii_download="YES"
212 | ascii_upload="YES"
213 | ;;
214 | esac
215 |
216 | ########## Since Ver 4.0 ##########
217 |
218 | if [ $proctitle_enable -eq 1 ]; then
219 | proctitle_enable="YES"
220 | else
221 | proctitle_enable="NO"
222 | fi
223 |
224 | if [ $xferlog_enable -eq 1 ]; then
225 | xferlog_enable="YES"
226 | else
227 | xferlog_enable="NO"
228 | fi
229 |
230 | if [ ! $log_path ]; then
231 | log_path="/tmp/log/vsftpd.log"
232 | fi
233 |
234 | if [ $listen_ipv6 -eq 1 ]; then
235 | listen_ipv6="YES"
236 | else
237 | listen_ipv6="NO"
238 | fi
239 |
240 | if [ $pasv_enable -eq 1 ]; then
241 | pasv_enable="YES"
242 | else
243 | pasv_enable="NO"
244 | fi
245 |
246 | ########## Since Ver 5.0 ##########
247 | if [ $guest_enable -eq 1 ]; then
248 | local_enable="YES"
249 | guest_enable="YES"
250 | else
251 | guest_enable="NO"
252 | fi
253 |
254 | if [ ! $guest_username ]; then
255 | guest_username=ftp
256 | fi
257 |
258 | mkdir -p /var/etc
259 | sed -e "s#|MAX_CLIENTS|#$max_clients#g" \
260 | -e "s#|ANONYMOUS_ENABLE|#$anonymous_enable#g" \
261 | -e "s#|ANON_UPLOAD_ENABLE|#$anon_upload_enable#g" \
262 | -e "s#|ANON_MKDIR_WRITE_ENABLE|#$anon_mkdir_write_enable#g" \
263 | -e "s#|ANON_ROOT|#$anon_root#g" \
264 | -e "s#|LOACL_ENABLE|#$local_enable#g" \
265 | -e "s#|WRITE_ENABLE|#$write_enable#g" \
266 | -e "s#|CHOWN_UPLOADS|#$chown_uploads#g" \
267 | -e "s#|CHROOT_LOCAL_USER|#$chroot_local_user#g" \
268 | -e "s#|LOCAL_UMASK|#$local_umask#g" \
269 | -e "s#|FTPD_BANNER|#$ftpd_banner#g" \
270 | -e "s#|USERLIST_ENABLE|#$userlist_enable#g" \
271 | -e "s#|USERLIST_DENY|#$userlist_deny#g" \
272 | -e "s#|DIRMESSAGE_ENABLE|#$dirmessage_enable#g" \
273 | -e "s#|CONNECT_FROM_PORT_20|#$connect_from_port_20#g" \
274 | -e "s#|ASYNC_ABOR_ENABLE|#$async_abor_enable#g" \
275 | -e "s#|LS_RECURSE_ENABLE|#$ls_recurse_enable#g" \
276 | -e "s#|ASCII_DOWNLOAD_ENABLE|#$ascii_download#g" \
277 | -e "s#|ASCII_UPLOAD_ENABLE|#$ascii_upload#g" \
278 | -e "s#|IDLE_SESSION_TIMEOUT|#$idle_session_timeout#g" \
279 | -e "s#|DATA_CONNECTION_TIMEOUT|#$data_connection_timeout#g" \
280 | -e "s#|XFERLOG_ENABLE|#$xferlog_enable#g" \
281 | -e "s#|LOG_PATH|#$log_path#g" \
282 | -e "s#|PROCTITLE_ENABLE|#$proctitle_enable#g" \
283 | -e "s#|CHOWN_USERNAME|#$chown_username#g" \
284 | -e "s#|LISTEN_IPV6|#$listen_ipv6#g" \
285 | -e "s#|PASV_ENABLE|#$pasv_enable#g" \
286 | -e "s#|MAX_PER_IP|#$max_per_ip#g" \
287 | -e "s#|GUEST_ENABLE|#$guest_enable#g" \
288 | -e "s#|GUEST_USERNAME|#$guest_username#g" \
289 | /etc/vsftpd.conf.template > /var/etc/vsftpd.conf
290 |
291 | ########## Since Ver 4.0 ##########
292 | if [ $chown_username ]; then
293 | echo "chown_username=$chown_username" >> /var/etc/vsftpd.conf
294 | fi
295 |
296 | if [ $pasv_min_port ]; then
297 | echo "pasv_min_port=$pasv_min_port" >> /var/etc/vsftpd.conf
298 | fi
299 |
300 | if [ $pasv_max_port ]; then
301 | echo "pasv_max_port=$pasv_max_port" >> /var/etc/vsftpd.conf
302 | fi
303 |
304 | if [ $local_max_rate -ne 0 ]; then
305 | let local_max_rate*=1024
306 | echo "local_max_rate=$local_max_rate" >> /var/etc/vsftpd.conf
307 | fi
308 |
309 | if [ $anon_max_rate -ne 0 ]; then
310 | let anon_max_rate*=1024
311 | echo "anon_max_rate=$anon_max_rate" >> /var/etc/vsftpd.conf
312 | fi
313 |
314 |
315 | [ -f /etc/vsftpd.conf ] && [ ! -L /etc/vsftpd.conf ] && mv -f /etc/vsftpd.conf /etc/vsftpd.conf.bak
316 | ln -nsf /var/etc/vsftpd.conf /etc/vsftpd.conf
317 |
318 | rm -rf /var/etc/vsftpd
319 | mkdir -p /var/etc/vsftpd/vconfig
320 | config_list_foreach main userlist mkuserlist
321 |
322 | touch /var/etc/vsftpd/virtual
323 | config_foreach mkvconfig guests
324 | db_load -T -t hash -f /var/etc/vsftpd/virtual /var/etc/vsftpd/virtual.db
325 |
326 | mkdir -m 0755 -p /var/run/vsftpd
327 | service_start /usr/sbin/vsftpd
328 | }
329 |
330 | stop() {
331 | service_stop /usr/sbin/vsftpd
332 | }
333 |
334 | restart() {
335 | stop;sleep 2;start
336 | }
337 |
--------------------------------------------------------------------------------
/Source/op-dir/feeds/packages/net/vsftpd/files/vsftpd.pam:
--------------------------------------------------------------------------------
1 | #%PAM-1.0
2 | # auth for virtual user
3 | auth sufficient /lib/security/pam_userdb.so db=/var/etc/vsftpd/virtual
4 | account sufficient /lib/security/pam_userdb.so db=/var/etc/vsftpd/virtual
5 |
6 | # auth for unix user
7 | auth optional /lib/security/pam_keyinit.so force revoke
8 | auth required /lib/security/pam_unix.so shadow nullok
9 | account required /lib/security/pam_unix.so
10 | session required /lib/security/pam_unix.so
11 |
--------------------------------------------------------------------------------
/Source/op-dir/feeds/packages/net/vsftpd/patches/001-destdir.patch:
--------------------------------------------------------------------------------
1 | --- a/Makefile
2 | +++ b/Makefile
3 | @@ -22,6 +22,8 @@ OBJS = main.o utility.o prelogin.o ftpcm
4 | seccompsandbox.o
5 |
6 |
7 | +DESTDIR =
8 | +
9 | .c.o:
10 | $(CC) -c $*.c $(CFLAGS) $(IFLAGS)
11 |
12 | @@ -29,21 +31,20 @@ vsftpd: $(OBJS)
13 | $(CC) -o vsftpd $(OBJS) $(LINK) $(LDFLAGS) $(LIBS)
14 |
15 | install:
16 | - if [ -x /usr/local/sbin ]; then \
17 | - $(INSTALL) -m 755 vsftpd /usr/local/sbin/vsftpd; \
18 | - else \
19 | - $(INSTALL) -m 755 vsftpd /usr/sbin/vsftpd; fi
20 | - if [ -x /usr/local/man ]; then \
21 | - $(INSTALL) -m 644 vsftpd.8 /usr/local/man/man8/vsftpd.8; \
22 | - $(INSTALL) -m 644 vsftpd.conf.5 /usr/local/man/man5/vsftpd.conf.5; \
23 | - elif [ -x /usr/share/man ]; then \
24 | - $(INSTALL) -m 644 vsftpd.8 /usr/share/man/man8/vsftpd.8; \
25 | - $(INSTALL) -m 644 vsftpd.conf.5 /usr/share/man/man5/vsftpd.conf.5; \
26 | - else \
27 | - $(INSTALL) -m 644 vsftpd.8 /usr/man/man8/vsftpd.8; \
28 | - $(INSTALL) -m 644 vsftpd.conf.5 /usr/man/man5/vsftpd.conf.5; fi
29 | - if [ -x /etc/xinetd.d ]; then \
30 | - $(INSTALL) -m 644 xinetd.d/vsftpd /etc/xinetd.d/vsftpd; fi
31 | + mkdir -p $(DESTDIR)/usr/sbin
32 | + $(INSTALL) -m 755 vsftpd $(DESTDIR)/usr/sbin/
33 | + mkdir -p $(DESTDIR)/usr/share/man/man8
34 | + $(INSTALL) -m 644 vsftpd.8 $(DESTDIR)/usr/share/man/man8/
35 | + mkdir -p $(DESTDIR)/usr/share/man/man5
36 | + $(INSTALL) -m 644 vsftpd.conf.5 $(DESTDIR)/usr/share/man/man5/
37 | + mkdir -p $(DESTDIR)/etc/xinetd.d
38 | + $(INSTALL) -m 644 xinetd.d/vsftpd $(DESTDIR)/etc/xinetd.d/
39 | +
40 | +uninstall:
41 | + rm -f $(DESTDIR)/usr/sbin/vsftpd
42 | + rm -f $(DESTDIR)/usr/share/man/man8/vsftpd.8
43 | + rm -f $(DESTDIR)/usr/share/man/man5/vsftpd.conf.5
44 | + rm -f $(DESTDIR)/etc/xinetd.d/vsftpd
45 |
46 | clean:
47 | rm -f *.o *.swp vsftpd
48 |
--------------------------------------------------------------------------------
/Source/op-dir/feeds/packages/net/vsftpd/patches/002-find_libs.patch:
--------------------------------------------------------------------------------
1 | --- a/Makefile
2 | +++ b/Makefile
3 | @@ -8,8 +8,8 @@ CFLAGS = -O2 -fPIE -fstack-protector --p
4 | #CFLAGS = -g
5 | CFLAGS = -O2 -Wall -W -Wshadow #-pedantic -Werror -Wconversion
6 |
7 | -LIBS = `./vsf_findlibs.sh`
8 | -LINK = -Wl,-s
9 | +LIBS = -lcrypt -lnsl -lpam
10 | +LINK =
11 |
12 | OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \
13 | tunables.o ftpdataio.o secbuf.o ls.o \
14 |
--------------------------------------------------------------------------------
/Source/op-dir/feeds/packages/net/vsftpd/patches/003-chroot.patch:
--------------------------------------------------------------------------------
1 | --- a/tunables.c
2 | +++ b/tunables.c
3 | @@ -254,7 +254,7 @@ tunables_load_defaults()
4 | /* -rw------- */
5 | tunable_chown_upload_mode = 0600;
6 |
7 | - install_str_setting("/usr/share/empty", &tunable_secure_chroot_dir);
8 | + install_str_setting("/var/run/vsftpd", &tunable_secure_chroot_dir);
9 | install_str_setting("ftp", &tunable_ftp_username);
10 | install_str_setting("root", &tunable_chown_username);
11 | install_str_setting("/var/log/xferlog", &tunable_xferlog_file);
12 |
--------------------------------------------------------------------------------
/Source/op-dir/feeds/packages/net/vsftpd/patches/004-disable-capabilities.patch:
--------------------------------------------------------------------------------
1 | --- a/sysdeputil.c
2 | +++ b/sysdeputil.c
3 | @@ -165,6 +165,9 @@
4 | #endif
5 | /* END config */
6 |
7 | +#undef VSF_SYSDEP_HAVE_CAPABILITIES
8 | +#undef VSF_SYSDEP_HAVE_LIBCAP
9 | +
10 | /* PAM support - we include our own dummy version if the system lacks this */
11 | #include
12 |
13 |
--------------------------------------------------------------------------------
/Source/patch/vsftpd_pam.patch:
--------------------------------------------------------------------------------
1 | --- feeds/packages/libs/db47/Makefile 2016-01-01 16:40:43.000000000 +0800
2 | +++ feeds/packages/libs/db47/Makefile 2016-04-23 15:34:52.830924661 +0800
3 | @@ -29,6 +29,20 @@
4 |
5 | include $(INCLUDE_DIR)/package.mk
6 |
7 | +define Package/db47
8 | + SECTION:=utils
9 | + CATEGORY:=Utilities
10 | + SUBMENU:=database
11 | + DEPENDS:=+libdb47
12 | + TITLE:=Berkeley DB library (4.7)
13 | + URL:=http://www.oracle.com/us/products/database/berkeley-db
14 | + PROVIDES:=db47-full
15 | +endef
16 | +
17 | +define Package/db47/description
18 | + Berkeley DB (4.7).
19 | +endef
20 | +
21 | define Package/libdb47
22 | SECTION:=libs
23 | CATEGORY:=Libraries
24 | @@ -78,6 +92,11 @@
25 | DESTDIR="$(PKG_INSTALL_DIR)" install
26 | endef
27 |
28 | +define Package/db47/install
29 | + $(INSTALL_DIR) $(1)/usr/bin
30 | + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
31 | +endef
32 | +
33 | define Package/libdb47/install
34 | $(INSTALL_DIR) $(1)/usr/lib
35 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb-*.so $(1)/usr/lib/
36 | @@ -96,5 +115,6 @@
37 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb*.{a,so} $(1)/usr/lib
38 | endef
39 |
40 | +$(eval $(call BuildPackage,db47))
41 | $(eval $(call BuildPackage,libdb47))
42 | $(eval $(call BuildPackage,libdb47xx))
43 | --- feeds/packages/libs/libpam/Makefile 2016-04-23 20:49:39.426702744 +0800
44 | +++ feeds/packages/libs/libpam/Makefile 2016-04-23 20:52:12.490704191 +0800
45 | @@ -25,6 +25,7 @@
46 | define Package/libpam
47 | SECTION:=libs
48 | CATEGORY:=Libraries
49 | + DEPENDS:=+libdb47
50 | TITLE:=the Linux-PAM libraries and modules.
51 | URL:=http://www.kernel.org/pub/linux/libs/pam
52 | endef
53 | @@ -45,7 +46,7 @@
54 | --disable-selinux \
55 | --disable-nls \
56 | --disable-rpath \
57 | - --enable-db=no \
58 | + --enable-db=db \
59 | )
60 | endef
61 |
62 |
--------------------------------------------------------------------------------
/VERSION.txt:
--------------------------------------------------------------------------------
1 | [5.1 - 20160504]
2 | -Bug修补
3 |
4 | [5.0 - 20160424]
5 | -修正当禁用本地用户时配置文件生成包含错误导致软件不启动的问题
6 | -变更luci软件包的目录结果为15.05.1的luci目录结构
7 | -增加基于db4.7的虚拟用户功能
8 |
--------------------------------------------------------------------------------