====== PHP File Navigator ======
[[http://pfn.sourceforge.net/|PHP File Navigator]] allows simple files management using web interface, with per user/group security.
A copy of version 2.3.3 is available here: {{:pfn:phpfilenavigator-2.3.3.zip|}}
===== Customization =====
^ Customize ^ Change file ^
| welcome text and title | data/idiomas/en/web.inc.php |
| footer link | data/plantillas/pe.inc.php |
| Logo | estilos/pfn/imx/logo.png |
===== Configure max upload size =====
Edit ''/etc/php.ini'', set:
* upload_max_filesize
* post_max_size
**Note:** post_max_size must be equal or larger than upload_max_filesize.
Edit **''data/conf/default.inc.php''** (and other config files that allow upload), set:
'peso' => 1024*12024*500, // allow 500M upload
Edit **''data/include/class_sesion.php''**, set:
var $tempo = 86400; // so that upload session take 1 day
===== Fix Chinese filename problem =====
Edit **''data/accions/descargar.inc.php''**, near line 118, change:
header('Content-Disposition: attachment; filename="'.str_replace(array(' ','"'),'_',$ucal).'"');
to
header('Content-Disposition: attachment; filename="'.str_replace(array(' ','"'),'_',$cal).'"');
===== Change file create mode =====
Edit 4 files:
1. **''data/include/class_arquivos.php''**
139 @chmod($arq,0644);
2. **''data/include/class_accions.php''**
136 $this->estado['crear_dir'] = @mkdir($completo, 0755);
185 $this->arquivos->permisos($destino.'/'.$nome, 0644);
318 if (!@mkdir($destino, 0755)) {
725 $this->arquivos->permisos($arq, 0644);
3. **''data/include/class_extraer.php''**
189 if (@mkdir($arquivo,0755)) {
245 @chmod($arquivo, 0644);
4. **''data/include/funcions.php''**
646 $mode = 0755;
If you are using linux, the following auto open these files:
cd /path-to-pfn/
vi `egrep "(644|755)" * -rl`
However, exclude the files in ./xestion/ subfolders.
===== Fix no download icon problem =====
Edit **''data/conf/default.inc.php''**, set:
'descargar' => true, // Download
Force download to disk instead of open in browser:
'descarga_defecto' => 'descargar',
===== Force email notification =====
The user can check the option to send an email to all related users with a root.
To force always send email, you can change this line in **''data/accions/subir_arq.inc.php''**:
if ($aviso_subida[$i] && $PFN_conf->g('avisos','subida')) {
to
if (true) {
===== Windows file permission =====
In Windows environment, the uploaded file will not inherit the permission of its parent folder.
To fix this problem, edit **''data/include/class_accions.php''**, and modify the function ''upload'' like this:
// comment out this line:
//$this->estado['subir_arq'] = @move_uploaded_file($orixen, $destino.'/'.$nome);
// add these 2 lines:
$this->estado['subir_arq'] = @copy($orixen, $destino.'/'.$nome);
unlink($orixen);
===== Example usage =====
==== Requirement ====
* Production needs to exchange files with supplier_A and supplier_B.
* Supplier_A and supplier_B are not allowed to access each other's files.
* No Disk Quota, Upload and Download limit.
==== Steps ====
Login as Admin
At the admin root folder ''/example'', create production folder and 2 subfolder, supplier_A and supplier_B:
production
|-- supplier_A
|-- supplier_B
create 3 roots:
* production (set path: /example/production/)
* supplier_A (set path: /example/production/supplier_A/)
* supplier_B (set path: /example/production/supplier_B/)
create 3 users:
* production (set Related Roots to production)
* supplier_A (set Related Roots to supplier_A)
* supplier_B (set Related Roots to supplier_B)
----