--- rpms/e-smith-ibays/sme10/e-smith-ibays-2.6.0-create_tmp_folder_in_ibays.patch 2016/06/23 08:16:25 1.1 +++ rpms/e-smith-ibays/sme10/e-smith-ibays-2.6.0-create_tmp_folder_in_ibays.patch 2016/07/07 02:42:09 1.4 @@ -7,7 +7,7 @@ diff -Nur e-smith-ibays-2.4.0/root/etc/e #-------------------------------------------------- +##create the upload_tmp_folder in the ibay if PHPTmpDir is set to 'enabled' +my $tmpdir = $ibay->prop('PHPTmpDir') || 'enabled'; -+$tmpdir = ('/home/e-smith/files/ibays/' . $ibay->key . '/tmp') if $tmpdir eq 'enabled'; ++$tmpdir = ('/var/cache/e-smith/files/ibays/' . $ibay->key . '/tmp') if $tmpdir eq 'enabled'; +mkdir $tmpdir unless (-d $tmpdir || $tmpdir eq "disabled"); chdir "/home/e-smith/files/ibays/$ibayName" @@ -16,12 +16,12 @@ diff -Nur e-smith-ibays-2.4.0/root/etc/e $experm |= $::fileperm; chmod $experm, $_; } -+ ##chmod 0700 ; chown www:www if upload_tmp_folder exists -+ my $tmpdirperm = (('/home/e-smith/files/ibays/' . $ibay->key . '/tmp')||''); ++ ##chmod 0600 ; chown www:www if upload_tmp_folder exists ++ my $tmpdirperm = (('/var/cache/e-smith/files/ibays/' . $ibay->key . '/tmp')||''); + if ( -d $tmpdirperm) + { + system ('/bin/chown', '-R', 'www:www' , $tmpdirperm); -+ system ('/bin/chmod' ,'-R', '0700' , $tmpdirperm ); ++ system ('/bin/chmod', '0600' , $tmpdirperm ); + } } } @@ -53,20 +53,15 @@ diff -Nur e-smith-ibays-2.4.0/root/etc/e + #Then we retrieve the name of the ebay + my $key = $ibay->key; + my $tmpdb = $ibay->prop('PHPTmpDir') || 'enabled'; -+ my $path = (('/home/e-smith/files/ibays/') . $key . '/tmp'); ++ 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") + { -+ mkdir $path, 0700 or warn "Could not create dir $path: $!"; ++ mkdir $path, 0600 or warn "Could not create dir $path: $!"; + chown $uid, $gid, $path or warn "Could not chown dir $path: $!"; + } +} + exit (0); -diff -Nur e-smith-ibays-2.4.0/root/etc/e-smith/skel/ibay/tmp/.cvs_ignore e-smith-ibays-2.4.0.bz7011/root/etc/e-smith/skel/ibay/tmp/.cvs_ignore ---- e-smith-ibays-2.4.0/root/etc/e-smith/skel/ibay/tmp/.cvs_ignore 1970-01-01 01:00:00.000000000 +0100 -+++ e-smith-ibays-2.4.0.bz7011/root/etc/e-smith/skel/ibay/tmp/.cvs_ignore 2015-01-03 23:58:20.889702229 +0100 -@@ -0,0 +1 @@ -+#added to create the /etc/e-smith/skel/ibay/tmp folder