Changes between Version 1 and Version 2 of FTP Batch Installation

Show
Ignore:
Timestamp:
09/21/10 16:46:48 (3 years ago)
Author:
robert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FTP Batch Installation

    v1 v2  
    1 == Installation == 
     1== FTP Batch Installation == 
    22 
    33In order to use the MediaMosa bulkupload facility your system should run a FTP Server to allow users to upload their data to your server using FTP. 
     
    1414During the ProFTPd configuration, choose 'standalone' is acceptable for most installations. 
    1515 
    16 Now create required group and user (with root privileges); 
     16Now create required group and user (with root privileges); [[BR]] 
     17{{{ 
    1718groupadd -g 200 ftpgroup 
    1819useradd -u 200 -s /bin/false -d __HOMEDIR__ -c "proftpd user" -g ftpgroup ftpuser 
    1920groupadd -g 60001 nas 
    2021useradd -u 60001 -g nas nas 
     22}}} 
    2123 
     24Replace the __HOMEDIR__ with the path to the directory where you want to place the FTP-users' home-direcotries and the newly created user has write-access to this directory. 
     25 
     26Create a new file called /etc/proftpd/mediamosa_proftpd.conf (with root) and add the following text; 
     27 
     28{{{ 
     29ServerName                      "Batchupload MediaMosa" 
     30 
     31DefaultRoot                     ~ 
     32 
     33# Users require a valid shell listed in /etc/shells to login. 
     34# Use this directive to release that constrain. 
     35RequireValidShell               off 
     36 
     37# Set the user and group that the server normally runs at. 
     38User                            www-data 
     39Group                           nas 
     40 
     41DebugLevel 1 
     42<IfModule mod\verb!_!sql.c> 
     43SQLBackend                      mysql 
     44# userid van www-data 
     45SQLMinID                        33 
     46SQLDefaultUID                   33 
     47# groupid van nas 
     48SQLDefaultGID                   60001 
     49#SQLHomedirOnDemand             on 
     50SQLAuthenticate                 users 
     51SQLAuthTypes                    OpenSSL 
     52 
     53## databasename@host database_user user_password 
     54 
     55SQLConnectInfo     mediamosa@host user password 
     56SQLUserInfo        mediamosa_ftp_user userid passwd uid gid homedir shell 
     57SQLUserWhereClause "active=1" 
     58 
     59## create a user's home directory on demand if it doesn't exist 
     60#SQLHomedirOnDemand      on 
     61CreateHome      on 777 
     62 
     63SQLLog             PASS updatecount 
     64SQLNamedQuery      updatecount UPDATE "count=count+1, accessed=now() WHERE  userid='%u'" ftpuser 
     65 
     66SQLLog             STOR,DELE modified 
     67SQLNamedQuery      modified UPDATE "modified=now() WHERE userid='%u'" ftpuser 
     68</IfModule> 
     69}}} 
     70 
     71Make sure you change the SQLConnectInfo with the correct MySQL user connection. 
     72 
     73Now edit /etc/proftpd/proftpd.conf and add the following line at the end of the file; 
     74{{{ 
     75Include /etc/proftpd/mediamosa_proftpd.conf 
     76}}} 
     77 
     78To make your changes to take effect, you need to restart the FTP server; 
     79{{{ 
     80/etc/init.d/proftpd restart 
     81}}} 
     82 
     83=== XML-parser === 
     84 
     85The next step is to install xml-parser by running (with root privileges): 
     86 
     87dpkg -i vpx-xp_1.0.3_i386.deb 
     88 
     89and apply the following changes to /user/local/xml-parser/settings.php: 
     90{{{ 
     91define("VPX_HOST",               "localhost"); 
     92define("VPX_URL_PREFIX",         ""); 
     93define("SAN_NAS_BASE_PATH",      "__HOMEDIR__"); 
     94}}} 
     95Also replace  __HOMEDIR__ with the path to the previously defined upload-directory. 
     96 
     97=== Watcher software === 
     98 
     99Finally you need to install and run the watcher software. 
     100This software will detect any changes in the ftp-upload directory and control the the processing of the uploaded files. 
     101 
     102As the watcher-software uses gaminlib0 you will have to install this library first. 
     103Using root-privileges run: 
     104 
     105apt-get install gamin gaminlib0 
     106 
     107after that you can install the watcher-software itself: 
     108 
     109dpkg -i vpx-dw_1.0.1_i386.deb 
     110 
     111Finally you will have to the following changes to /opt/local/etc/watcher/watcher.conf 
     112{{{ 
     113# The user and group id of the daemon 
     114ServerId = 33:60001 
     115 
     116# The script that will handle created files 
     117Handler = /var/opt/local/xml-parser/process.php 
     118 
     119# Base directory under which user subdirectories will be added. 
     120BaseDir = __HOMEDIR__ 
     121}}}