CC-3770: Make sure files in /srv/airtime/stor have world-readable permissions.

-change read permissions on files right after they're uploaded
This commit is contained in:
Martin Konecny 2012-05-07 13:12:20 -04:00
parent bd6686a243
commit c466b946a0
1 changed files with 5 additions and 0 deletions

View File

@ -879,6 +879,11 @@ Logging::log("getting media! - 2");
$audio_stor = Application_Common_OsPath::join($stor, "organize", $fileName);
Logging::log("copyFileToStor: moving file $audio_file to $audio_stor");
if (chmod($audio_file, 0644) === false){
Logging::log("Warning: couldn't change permissions of $audio_file to 0644");
}
//Martin K.: changed to rename: Much less load + quicker since this is an atomic operation
$r = @rename($audio_file, $audio_stor);