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-23 02:57:56.838000000 -0400 +++ e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/ibay-modify 2016-06-23 03:18:20.693000000 -0400 @@ -163,6 +163,10 @@ $tmpdir = ('/var/cache/e-smith/files/ibays/' . $ibay->key . '/tmp') if $tmpdir eq 'enabled'; mkdir $tmpdir unless (-d $tmpdir || $tmpdir eq "disabled"); +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"); + chdir "/home/e-smith/files/ibays/$ibayName" or ( $x = 255, warn "Could not chdir to /home/e-smith/files/ibays/$ibayName" ); @@ -238,6 +242,13 @@ system ('/bin/chown', '-R', 'www:www' , $tmpdirperm); system ('/bin/chmod' ,'-R', '0700' , $tmpdirperm ); } + ##chmod 0700 ; chown www:www if session folder exists + my $sessdirperm = (('/var/cache/e-smith/files/ibays/' . $ibay->key . '/session')||''); + if ( -d $sessdirperm) + { + system ('/bin/chown', '-R', 'www:www' , $sessdirperm); + system ('/bin/chmod' ,'-R', '0700' , $sessdirperm ); + } } } 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-23 02:57:56.838000000 -0400 +++ e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/init-ibays 2016-06-23 03:21:50.502000000 -0400 @@ -72,6 +72,7 @@ #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 @@ -79,6 +80,12 @@ { mkdir $path, 0700 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") + { + mkdir $path, 0700 or warn "Could not create dir $path: $!"; + chown $uid, $gid, $path or warn "Could not chown dir $path: $!"; } }