|
|
|
|
| About the UD Dropbox2 Package |
March 2, 2007 |
 |
From the "about" page for the UD Dropbox service:
Email messages with large attachments can wreak havoc on email servers and your own system. Downloading such email messages can take hours on a slow Internet connection and block your sending and receiving of messages through the duration. In some cases, the download will fail repeatedly, breaking the recipient's ability to receive mail at all. Also, Internet email clients add considerably to the size of the file being sent. For example, saving an Outlook Express message with an attachment adds up to 40% to the file's size. If you want to share files larger than 1MB, use the UD Dropbox Service to temporarily make a file (or files) available to another user across the Internet, in a secure and efficient manner.
There are two distinct kinds of users that will be accessing the dropbox system: inside users, who are associated with the organization running the service, and outside users, which encompasses the rest of the Internet.
An inside user is allowed to create a drop-off that is to be delivered to anyone, whether he or she be an inside or outside user. An outside user is only allowed to create a drop-off that is to be delivered to an inside user. That begs the question: what is a drop-off?
The original variant of the dropbox service was PERL code that allowed a single file to be dropped-off to a single user. With version 2.0, a dropoff now can contain multiple files and can target multiple recipients. A 50 MB file to be delivered to five users need not be uploaded five times, and only one copy will be kept on the server. This increases efficiency both for the user and for the server (in terms of disk space, for example).
The code was written under the auspices of the University of Delaware (Network and Systems Services). It requires PHP 5, compiled with SQLite (enabled by default when you ./configure) and LDAP support. It runs quite nicely through the Apache 2 web server with PHP support. Statistics tracking can be handled using RRDTool. |
|
|
|
|
|
|
|
|
|
| Dropbox 2.0 and Fedore Core |
March 19, 2007 |
 |
NOTE: The patches below apply to version 2.0 of Dropbox, and have not been tried with 2.1!
Fedora Core ships PHP5 compiled with --without sqlite (brilliant, Fedora...drop the one PHP feature I rely on). One Dropbox2 adopter wrote to tell me that the php-pecl-sqlite module is not available in pre-built form for PHP5; there is a bug report filed and it looks like the Fedora folks are only supporting php-pecl-pdo-sqlite. Of course, the PDO module is aged and doesn't include support for the SQLiteDatabase class. The only other option is to build your own PHP from source and include SQLite support (which is what I do on most of my machines anyway). I pass along these PDO-based instructions from the user who alerted me, but make no claims or guarantees since I haven't tested it.
At any rate, to install the PDO, first get it from PECL and configure it:
% wget-q http://pecl.php.net/get/SQLite-1.0.3.tgz
% tar -zxf SQLite-1.0.3.tgz
% cd SQLite-1.0.3
% phpize
% ./configure
Next, you'll have to edit the sqlite.c source file to comment-out this line
/* static unsigned char arg3_force_ref[] = {3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; */
and change
function_entry sqlite_functions[] = {
PHP_FE(sqlite_open, arg3_force_ref)
PHP_FE(sqlite_popen, arg3_force_ref)
to
function_entry sqlite_functions[] = {
PHP_FE(sqlite_open, third_arg_force_ref)
PHP_FE(sqlite_popen, third_arg_force_ref)
Build and install (note that these instructions will put everything in default locations).
% make
% make install
% cp modules/sqlite.so /usr/lib/php/modules
Add a configuration file at /etc/php.d/sqlite.ini containing
; Enable sqlite extension module
extension=sqlite.so
Restart your Apache server (perhaps with service restart httpd). As far as the Dropbox2 source is concerned, the following patch files will help you out:
| File |
Description |
|
diff patch for NSSDropbox.php (for Dropbox 2.0) |
|
diff patch for NSSDropoff.php (for Dropbox 2.0) |
|
To apply them:
% cd NSSDropbox2/lib
% patch NSSDropbox.php NSSDropbox.patch
% patch NSSDropoff.php NSSDropoff.patch
|
|
|
|
|
|
|
|
|
|
| Dropbox 2.1 Package Released |
June 15, 2007 |
 |
With version 2.1 of Dropbox, I've made a much better effort at factoring-out all references to UDel-specific things (UDelNetID, appended mail domain on plain usernames, etc). Now it should be slightly easier for other institutions to customize the Dropbox interface to their particulars.
The minor version number was bumped due to a completely revised authenticator class structure1. There were myriad suggestions from those who have downloaded and set up a Dropbox. The classes have been rewritten to be more modular in nature, with each subclass stored in its own file and loaded on-demand; more object-oriented, with the list of Dropbox admins now an inherited feature of the abstract base class NSSAuthenticator; and the addition of an IMAP-based authenticator (contributed by Scott Merrill).
So in the end, not much has truly changed in this release; your existing Dropbox site should work as-is, most likely. Make sure you glance at the Admin Guide, particularly the sections on the preferences file.
1 Some people have reported problems when installing 2.1 and have reverted to 2.0 with success -- I think this is probably because they are configuring the authenticator preference item improperly. The case of the value for that key must match the case in the class filename, a'la LDAP, Static, or IMAP
|
|
|
|
|
|
|
|
|
|
| Dropbox2 and Large Files |
October 19, 2007 |
 |
Consternated by the fact that Dropbox won't seem to take files larger than 2GB even though you've configured your php.ini and Dropbox preferences.php properly? There are basically two problems with large file support, and neither of them are Dropbox's fault!
First and foremost, you need a copy of PHP (and Apache, unless you run PHP as a CGI) compiled 64-bit to enable support for integers large enough to handle the moving of large (as in > 2GB) files through PHP. Internally, PHP and Zend handle file sizes as type long int data, so you need to compile on an ISA under which long int is 64-bits wide.
The second (and more dastardly) problem is that even though you compile PHP to be 64-bit, the function Zend uses to convert a textual memory value like 10000M in your php.ini to an integer value is declared and defined thusly:
ZEND_API int zend_atoi(const char *str, int str_len);
ZEND_API int zend_atoi(const char *str, int str_len)
{
int retval;
if (!str_len) {
str_len = strlen(str);
}
retval = strtol(str, NULL, 0);
if (str_len>0) {
switch (str[str_len-1]) {
case 'g':
case 'G':
retval *= 1024;
/* break intentionally missing */
case 'm':
case 'M':
retval *= 1024;
/* break intentionally missing */
case 'k':
case 'K':
retval *= 1024;
break;
}
}
return retval;
}
So despite the fact that strtol() is being used to do the conversion, the resulting integer is being dropped back to 32-bits when it's returned! This means that I'll wind up getting a garbage value for 10000M despite the fact that the ISA (64-bit long support) can handle it!
The good news is that one can modify the source cited above and get a PHP build that really does support 64-bit integers properly. First, change the prototype in Zend/zend_operators.h to be:
ZEND_API long zend_atoi(const char *str, int str_len);
Secondly, replace the function itself in Zend/zend_operators.c; it's really just a change of int to long to preserve the resultant bit depth coming from strtol():
ZEND_API long zend_atoi(const char *str, int str_len)
{
long retval;
if (!str_len) {
str_len = strlen(str);
}
retval = strtol(str, NULL, 0);
if (str_len>0) {
switch (str[str_len-1]) {
case 'g':
case 'G':
retval *= 1024;
/* break intentionally missing */
case 'm':
case 'M':
retval *= 1024;
/* break intentionally missing */
case 'k':
case 'K':
retval *= 1024;
break;
}
}
return retval;
}
You'll need to do a make clean and rebuild and reinstall the entire PHP package since the API change you just made will indirectly affect other pieces of code that are calling zend_atoi().
This solution is tested and works -- UD's production Dropbox (version 2) server has been using a version of PHP thusly-built ever since its setup! |
|
|
|
|
|
|
|
|
|
| Dropbox Wiki Goes Online |
April 17, 2008 |
 |
|
At long last, I've put together a wiki for Dropbox, complete with discussion areas so that you, the other users of Dropbox, can post your tips and tricks!
Visit the wiki. |
|
|
|
|
|
|
|
|
|
|
| Dropbox2 |
 |
version 2.0
A web-based file exchange package.
|
|
This software is made available under the terms of the GNU Public License.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
 |
|
The administrator's interface to Dropbox2. The system statistics button will not appear on your system unless you configure RRD tracking of statistics (see the Admin Guide for details).
|
 |
|
The web-based configuration page for Dropbox2 (see the Admin Guide for details).
|
|
|
|
|
|
|
|
|
|
|
| Kudos and Reviews |
|
 |
We're a company of about 200 users. The Dropbox was the ideal solution for us to move a lot of data from an old server to a new one in a smooth and organized fashion without overloading our mail server. You can be sure that the application is flexible since we run version 2.0 on an Ubuntu server with no problem at all.
The Dropbox service has every feature you could conceivably use already built in, and it's free.
I'd highly recommend this program to any one who needs to move large files in a simple, organized, and secure fashion.
Josh Hill, Viva Health
Please drop me an email if you or your organization are using Dropbox and would like to make a statement about its usefulness!
|
|
|
|
|
|
|