Changeset 361

Show
Ignore:
Timestamp:
05/23/06 02:17:04 (3 years ago)
Author:
sven
Message:

allow generated files to have separate permissions from their directories

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/config-dist.php

    r310 r361  
    3535// This should be OUTSIDE your wwwroot. 
    3636$CFG->dataroot = ''; 
    37 // You may change this value to something else but you must ensure that 
    38 // the user runs the web server process be able to read and write under 
    39 // this permission
     37// You may change these values to something else but you must ensure that 
     38// the user the web server process runs as is able to read and write under 
     39// these permissions
    4040//$CFG->directorypermissions = 0777; 
     41//$CFG->filepermissions = 0666; 
    4142 
    4243$CFG->dbtype = 'mysql'; // for now 
  • devel/lib/elgglib.php

    r343 r361  
    37413741        umask(0000); 
    37423742        if (copy($from_file,$to_file)) { 
    3743             chmod($to_file,$CFG->directorypermissions); 
     3743            chmod($to_file,$CFG->filepermissions); 
    37443744            return true; 
    37453745        } 
  • devel/lib/setup.php

    r356 r361  
    9595} 
    9696 
     97/// Files might not want all the permissions that directories have, e.g. +x or g+s, 
     98/// so using a separate setting for files 
     99if (empty($CFG->filepermissions)) { 
     100    $CFG->filepermissions = 0666;      // Must be octal 
     101} 
     102 
    97103if (!is_writable($CFG->dataroot)) { 
    98104    $messages[] = gettext("Your current dataroot directory, $CFG->dataroot is not writable by the webserver!"); 
  • devel/lib/uploadlib.php

    r344 r361  
    212212                } 
    213213                if (move_uploaded_file($this->files[$i]['tmp_name'], $destination.'/'.$this->files[$i]['name'])) { 
    214                     chmod($destination .'/'. $this->files[$i]['name'], $CFG->directorypermissions); 
     214                    chmod($destination .'/'. $this->files[$i]['name'], $CFG->filepermissions); 
    215215                    $this->files[$i]['fullpath'] = $destination.'/'.$this->files[$i]['name']; 
    216216                    $this->files[$i]['uploadlog'] .= "\n".gettext('File uploaded successfully');