Changeset 3183
- Timestamp:
- 06/19/12 17:29:15 (11 months ago)
- Location:
- alternc/trunk
- Files:
-
- 2 edited
-
bureau/class/m_bro.php (modified) (5 diffs)
-
src/fixperms.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
alternc/trunk/bureau/class/m_bro.php
r3170 r3183 472 472 * @return boolean TRUE si les fichiers ont t renomms, FALSE si une erreur s'est produite. 473 473 */ 474 function ChangePermissions($R,$d,$perm,$verbose= true) {474 function ChangePermissions($R,$d,$perm,$verbose=false) { 475 475 global $err; 476 476 $absolute=$this->convertabsolute($R,0); … … 545 545 function ExtractFile($file, $dest=null) 546 546 { 547 global $err ;547 global $err,$cuid,$mem,$L_ALTERNC_LOC; 548 548 $file = $this->convertabsolute($file,0); 549 549 if (is_null($dest)) { … … 557 557 } 558 558 $file = escapeshellarg($file); 559 $dest = escapeshellarg($dest); 559 $dest = escapeshellarg($dest); 560 $dest_to_fix=str_replace($L_ALTERNC_LOC."/html/".substr($mem->user["login"],0,1)."/".$mem->user["login"],'',$dest); 561 560 562 // TODO new version of tar supports `tar xf ...` so there is no 561 563 // need to specify the compression format … … 575 577 $err->raise("bro","could not find a way to extract file %s, unsupported format?", $file); 576 578 } 577 579 580 //fix the perms of the extracted archive 581 exec("sudo /usr/lib/alternc/fixperms.sh -u ".$cuid." -d ".$dest_to_fix); 578 582 return $ret; 579 583 } … … 713 717 $dir=str_replace("%2F", "/", urlencode($dir)); 714 718 $name=urlencode($name); 715 if (! $this->cacheurl["d".$dir]) {719 if (!@$this->cacheurl["d".$dir]) { 716 720 // On parcours $dir en remontant les / 717 721 $end=""; $beg=$dir; $tofind=true; -
alternc/trunk/src/fixperms.sh
r3170 r3183 107 107 108 108 # Set the file readable only for the AlternC User 109 chown -R $GID:$GID "$REP"109 chown -R alterncpanel:$GID "$REP" 110 110 chmod 2770 -R "$REP" 111 111 112 112 # Delete existings ACL 113 113 # Set the defaults acl on all the files 114 setfacl -b -k - m d:g:alterncpanel:rwx -m d:u:$GID:rw- -m d:g:$GID:rw-\115 -Rm g:alterncpanel:rwx -m u:$GID:rw- -m g:$GID:rw-\114 setfacl -b -k -n -R -m d:g:alterncpanel:rwx -m d:u::rwx -m d:g::rwx -m d:u:$GID:rwx -m d:g:$GID:rwx -m d:o::--- -m d:mask:rwx\ 115 -Rm g:alterncpanel:rwx -m u:$GID:rwx -m g:$GID:rwx -m mask:rwx\ 116 116 "$REP" 117 117 … … 125 125 echo "gid: $GID" 126 126 echo "file: $file" 127 chown $GID:$GID $file127 chown alterncpanel:$GID $file 128 128 chmod 0770 $file 129 129 /usr/bin/setfacl -m u:$GID:rw- -m g:$GID:rw- -m g:alterncpanel:rw- -m u:$GID:rw- -m g:$GID:rw- $file
Note: See TracChangeset
for help on using the changeset viewer.
