PHP warning

touch(): Utime failed: Permission denied

/srv/www/survey/survey1/application/models/Template.php(322)

310      * Touch each directory in standard template directory to force assset manager to republish them
311      */
312     public static function forceAssets()
313     {
314         // Don't touch symlinked assets because it won't work
315         if (App()->getAssetManager()->linkAssets) return;
316         $standardTemplatesPath = Yii::app()->getConfig("standardtemplaterootdir").DIRECTORY_SEPARATOR;
317         $Resource = opendir($standardTemplatesPath);
318         while ($Item = readdir($Resource))
319         {
320             if (is_dir($standardTemplatesPath . $Item) && $Item != "." && $Item != "..")
321             {
322                 touch($standardTemplatesPath . $Item);
323             }
324         }
325     }
326 }

Stack Trace

#0
+
 /srv/www/survey/survey1/application/models/Template.php(322): touch("/srv/www/survey/survey1/templates/ubuntu_orange")
317         $Resource = opendir($standardTemplatesPath);
318         while ($Item = readdir($Resource))
319         {
320             if (is_dir($standardTemplatesPath . $Item) && $Item != "." && $Item != "..")
321             {
322                 touch($standardTemplatesPath . $Item);
323             }
324         }
325     }
326 }
#1
+
 /srv/www/survey/survey1/application/models/UpdateForm.php(377): Template::forceAssets()
372     {
373         // Don't touch symlinked assets because it won't work
374         if (App()->getAssetManager()->linkAssets) return;
375 
376         // Republish the assets
377         Template::model()->forceAssets();
378         AdminTheme::forceAssets();
379 
380         // Delete all the content in the asset directory, but not the directory itself nor the index.html file at its root ^^
381         $sAssetsDir = Yii::app()->getConfig('tempdir') . '/assets/';
382         $dir = dir($sAssetsDir);
#2
+
 /srv/www/survey/survey1/application/models/UpdateForm.php(589): UpdateForm->republishAssets()
584         $iAssetVersionNumber  = Yii::app()->getConfig('assetsversionnumber');        // From version.php
585         $iCurrentAssetVersion = GetGlobalSetting('AssetsVersion');                       // From setting_global table
586 
587         if ( $iAssetVersionNumber != $iCurrentAssetVersion )
588         {
589             self::republishAssets();
590             setGlobalSetting('AssetsVersion',$iAssetVersionNumber);
591             App()->getController()->redirect(array("admin/"));
592         }
593         return false;
594     }
2017-02-28 10:37:19 Apache/2.2.15 (Red Hat) Yii Framework/1.1.17