Make all shares accessible in open_basedir

tags/0.1.1
Daniel Berteaud 13 years ago
parent 82e6798781
commit 3376d83a96
  1. 10
      root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98Ajaxplorer

@ -1,7 +1,6 @@
{
use esmith::AccountsDB;
my $a = esmith::AccountsDB->open_ro;
if (($ajaxplorer{'status'} || 'disabled') eq 'enabled'){
my $alias = (($ajaxplorer{'AliasOnPrimary'} || 'enabled') eq 'enabled' ) ? 'Alias /ajaxplorer /usr/share/ajaxplorer':'';
@ -13,11 +12,6 @@ if (($ajaxplorer{'status'} || 'disabled') eq 'enabled'){
my $maxsize = $ajaxplorer{'MaxUploadSize'} || '200M';
my $shares = '';
foreach my $share ($a->get_all_by_prop(type=>'share')){
my $name = $share->key;
my $access = $share->prop('Ajaxplorer') || 'disabled';
$shares .= ":/home/e-smith/files/shares/$name/files" if ($access eq 'enabled');
}
my $public = $ajaxplorer{'PublicShares'} || 'disabled';
$OUT .=<<"EOF" if ($public eq 'enabled');
@ -26,7 +20,7 @@ Alias /ajxppub /var/lib/ajaxplorer/public
<Directory /var/lib/ajaxplorer/public>
Options None
AddType application/x-httpd-php .php
php_admin_value open_basedir /usr/share/ajaxplorer:/var/lib/ajaxplorer:/var/log/ajaxplorer:/etc/ajaxplorer:/var/cache/ajaxplorer:/usr/share/pear/$shares
php_admin_value open_basedir /usr/share/ajaxplorer:/var/lib/ajaxplorer:/var/log/ajaxplorer:/etc/ajaxplorer:/var/cache/ajaxplorer:/usr/share/pear/:/home/e-smith/files/shares
Order deny,allow
Allow from all
<Files ".ajxp_*">
@ -42,7 +36,7 @@ $alias
<Directory /usr/share/ajaxplorer>
AddType application/x-httpd-php .php
php_admin_value open_basedir /usr/share/ajaxplorer:/var/lib/ajaxplorer:/var/log/ajaxplorer:/etc/ajaxplorer:/var/cache/ajaxplorer:/usr/share/pear/$shares
php_admin_value open_basedir /usr/share/ajaxplorer:/var/lib/ajaxplorer:/var/log/ajaxplorer:/etc/ajaxplorer:/var/cache/ajaxplorer:/usr/share/pear/:/home/e-smith/files/shares
php_admin_value memory_limit 100M
php_admin_value upload_max_filesize $maxsize
php_admin_value post_max_size $maxsize

Loading…
Cancel
Save