14 |
|
|
15 |
@@ -238,6 +242,13 @@ |
@@ -238,6 +242,13 @@ |
16 |
system ('/bin/chown', '-R', 'www:www' , $tmpdirperm); |
system ('/bin/chown', '-R', 'www:www' , $tmpdirperm); |
17 |
system ('/bin/chmod' ,'-R', '0700' , $tmpdirperm ); |
system ('/bin/chmod', '0600' , $tmpdirperm ); |
18 |
} |
} |
19 |
+ ##chmod 0700 ; chown www:www if session folder exists |
+ ##chmod 0600 ; chown www:www if session folder exists |
20 |
+ my $sessdirperm = (('/var/cache/e-smith/files/ibays/' . $ibay->key . '/session')||''); |
+ my $sessdirperm = (('/var/cache/e-smith/files/ibays/' . $ibay->key . '/session')||''); |
21 |
+ if ( -d $sessdirperm) |
+ if ( -d $sessdirperm) |
22 |
+ { |
+ { |
23 |
+ system ('/bin/chown', '-R', 'www:www' , $sessdirperm); |
+ system ('/bin/chown', '-R', 'www:www' , $sessdirperm); |
24 |
+ system ('/bin/chmod' ,'-R', '0700' , $sessdirperm ); |
+ system ('/bin/chmod', '0600' , $sessdirperm ); |
25 |
+ } |
+ } |
26 |
} |
} |
27 |
} |
} |
39 |
#we test the condition if /tmp exists or if it is disabled in the Ibay |
#we test the condition if /tmp exists or if it is disabled in the Ibay |
40 |
@@ -79,6 +80,12 @@ |
@@ -79,6 +80,12 @@ |
41 |
{ |
{ |
42 |
mkdir $path, 0700 or warn "Could not create dir $path: $!"; |
mkdir $path, 0600 or warn "Could not create dir $path: $!"; |
43 |
chown $uid, $gid, $path or warn "Could not chown dir $path: $!"; |
chown $uid, $gid, $path or warn "Could not chown dir $path: $!"; |
44 |
+ } |
+ } |
45 |
+ #we test the condition if /session exists or if it is disabled in the Ibay |
+ #we test the condition if /session exists or if it is disabled in the Ibay |
46 |
+ unless (-d $path || $sessiondb eq "disabled") |
+ unless (-d $path || $sessiondb eq "disabled") |
47 |
+ { |
+ { |
48 |
+ mkdir $path, 0700 or warn "Could not create dir $path: $!"; |
+ mkdir $path, 0600 or warn "Could not create dir $path: $!"; |
49 |
+ chown $uid, $gid, $path or warn "Could not chown dir $path: $!"; |
+ chown $uid, $gid, $path or warn "Could not chown dir $path: $!"; |
50 |
} |
} |
51 |
} |
} |