--- rpms/e-smith-ibays/sme10/e-smith-ibays-2.6.0-create_sess_folder_in_ibays.patch 2016/06/26 16:30:04 1.2 +++ rpms/e-smith-ibays/sme10/e-smith-ibays-2.6.0-create_sess_folder_in_ibays.patch 2016/06/26 17:43:08 1.3 @@ -14,14 +14,14 @@ diff -Nur e-smith-ibays-2.6.0.old/root/e @@ -238,6 +242,13 @@ system ('/bin/chown', '-R', 'www:www' , $tmpdirperm); - system ('/bin/chmod' ,'-R', '0700' , $tmpdirperm ); + system ('/bin/chmod', '0600' , $tmpdirperm ); } -+ ##chmod 0700 ; chown www:www if session folder exists ++ ##chmod 0600 ; 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 ); ++ system ('/bin/chmod', '0600' , $sessdirperm ); + } } } @@ -39,13 +39,13 @@ diff -Nur e-smith-ibays-2.6.0.old/root/e #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: $!"; + 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") + { -+ 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: $!"; } }