16 |
$experm |= $::fileperm; |
$experm |= $::fileperm; |
17 |
chmod $experm, $_; |
chmod $experm, $_; |
18 |
} |
} |
19 |
+ ##chmod 0700 ; chown www:www if upload_tmp_folder exists |
+ ##chmod 0600 ; chown www:www if upload_tmp_folder exists |
20 |
+ my $tmpdirperm = (('/var/cache/e-smith/files/ibays/' . $ibay->key . '/tmp')||''); |
+ my $tmpdirperm = (('/var/cache/e-smith/files/ibays/' . $ibay->key . '/tmp')||''); |
21 |
+ if ( -d $tmpdirperm) |
+ if ( -d $tmpdirperm) |
22 |
+ { |
+ { |
23 |
+ system ('/bin/chown', '-R', 'www:www' , $tmpdirperm); |
+ system ('/bin/chown', '-R', 'www:www' , $tmpdirperm); |
24 |
+ system ('/bin/chmod' ,'-R', '0700' , $tmpdirperm ); |
+ system ('/bin/chmod', '0600' , $tmpdirperm ); |
25 |
+ } |
+ } |
26 |
} |
} |
27 |
} |
} |
58 |
+ #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 |
59 |
+ unless (-d $path || $tmpdb eq "disabled") |
+ unless (-d $path || $tmpdb eq "disabled") |
60 |
+ { |
+ { |
61 |
+ mkdir $path, 0700 or warn "Could not create dir $path: $!"; |
+ mkdir $path, 0600 or warn "Could not create dir $path: $!"; |
62 |
+ chown $uid, $gid, $path or warn "Could not chown dir $path: $!"; |
+ chown $uid, $gid, $path or warn "Could not chown dir $path: $!"; |
63 |
+ } |
+ } |
64 |
+} |
+} |