diff -Nur e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/ibay-delete e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/ibay-delete --- e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/ibay-delete 2013-01-31 16:31:37.000000000 -0500 +++ e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/ibay-delete 2016-06-26 12:16:35.379000000 -0400 @@ -36,6 +36,7 @@ x=0 # exit value /bin/rm -rf /home/e-smith/files/ibays/$ibay +/bin/rm -rf /var/cache/e-smith/files/ibays/$ibay if [ "$ldapauth" != "enabled" ] then /usr/sbin/userdel "$ibay" || x=1 diff -Nur e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/ibay-modify e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/ibay-modify --- e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/ibay-modify 2016-06-26 12:03:21.373000000 -0400 +++ e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/ibay-modify 2016-06-26 12:25:45.073000000 -0400 @@ -158,11 +158,14 @@ #-------------------------------------------------- # main directory is writeable only by root #-------------------------------------------------- -##create the upload_tmp_folder in the ibay if PHPTmpDir is set to 'enabled' +##create ibay cache dir +my $cachedir= ('/var/cache/e-smith/files/ibays/' . $ibay->key ); +mkdir $cachedir unless (-d $cachedir); +##create the upload_tmp_folder in the ibay cache dir if PHPTmpDir is set to 'enabled' my $tmpdir = $ibay->prop('PHPTmpDir') || 'enabled'; $tmpdir = ('/var/cache/e-smith/files/ibays/' . $ibay->key . '/tmp') if $tmpdir eq 'enabled'; mkdir $tmpdir unless (-d $tmpdir || $tmpdir eq "disabled"); - +##create the session dir in the ibay cache dir if is set to 'enabled' my $sessdir = $ibay->prop('PHPSessionDir') || 'enabled'; $sessdir = ('/var/cache/e-smith/files/ibays/' . $ibay->key . '/session') if $sessdir eq 'enabled'; mkdir $sessdir unless (-d $sessdir || $sessdir eq "disabled"); diff -Nur e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/init-ibays e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/init-ibays --- e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/init-ibays 2016-06-26 12:03:21.373000000 -0400 +++ e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/init-ibays 2016-06-26 12:15:18.526000000 -0400 @@ -71,18 +71,25 @@ { #Then we retrieve the name of the ebay my $key = $ibay->key; - my $tmpdb = $ibay->prop('PHPTmpDir') || 'enabled'; - my $sessiondb = $ibay->prop('PHPSessionDir') || 'enabled'; - my $path = (('/var/cache/e-smith/files/ibays/') . $key . '/tmp'); - - #we test the condition if /tmp exists or if it is disabled in the Ibay - unless (-d $path || $tmpdb eq "disabled") + my $path = (('/var/cache/e-smith/files/ibays/') . $key ); + #we test the condition if ibay folder exists + unless (-d $path ) { mkdir $path, 0600 or warn "Could not create dir $path: $!"; chown $uid, $gid, $path or warn "Could not chown dir $path: $!"; } - #we test the condition if /session exists or if it is disabled in the Ibay - unless (-d $path || $sessiondb eq "disabled") + + $path = (('/var/cache/e-smith/files/ibays/') . $key . '/tmp'); + #we test the condition if /tmp exists + unless (-d $path) + { + mkdir $path, 0600 or warn "Could not create dir $path: $!"; + chown $uid, $gid, $path or warn "Could not chown dir $path: $!"; + } + + $path = (('/var/cache/e-smith/files/ibays/') . $key . '/session'); + #we test the condition if /session exists + unless (-d $path) { mkdir $path, 0600 or warn "Could not create dir $path: $!"; chown $uid, $gid, $path or warn "Could not chown dir $path: $!";