You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've figured up that Jenkins makes temporary directories /.~tmp~ with copies of original files at every folder on the project while deploying.
So the problem is that Apache doesn't have rights to read that folder. Framework tries to load the folder and it contents recursively and gets "Permission denied" error.
Please consider adding some kind of is_readable check to files and directories.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I've got a problem with configuration loading.
The case was:
RecursiveDirectoryIterator throwes error right after Jenkins deployment.
[2021-12-03 10:51:06] laravel.ERROR: RecursiveDirectoryIterator::__construct(/home/www/project/config/.~tmp~): Failed to open directory: Permission denied {"exception":"[object] (Symfony\\Component\\Finder\\Exception\\AccessDeniedException(code: 0): RecursiveDirectoryIterator::__construct(/home/www/project/config/.~tmp~): Failed to open directory: Permission denied at /home/www/project/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php:127) [stacktrace] #0 /home/www/project/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php(90): Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator->getChildren() #1 [internal function]: Symfony\\Component\\Finder\\Iterator\\ExcludeDirectoryFilterIterator->getChildren() #2 [internal function]: FilterIterator->next() #3 [internal function]: FilterIterator->next() #4 /home/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php(88): FilterIterator->next() #5 /home/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php(65): Illuminate\\Foundation\\Bootstrap\\LoadConfiguration->getConfigurationFiles(Object(Illuminate\\Foundation\\Application)) #6 /home/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php(39): Illuminate\\Foundation\\Bootstrap\\LoadConfiguration->loadConfigurationFiles(Object(Illuminate\\Foundation\\Application), Object(Illuminate\\Config\\Repository)) #7 /home/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(237): Illuminate\\Foundation\\Bootstrap\\LoadConfiguration->bootstrap(Object(Illuminate\\Foundation\\Application)) #8 /home/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(153): Illuminate\\Foundation\\Application->bootstrapWith(Array) #9 /home/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(137): Illuminate\\Foundation\\Http\\Kernel->bootstrap() #10 /home/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request)) #11 /home/www/project/web/index.php(80): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request)) #12 {main}
I've figured up that Jenkins makes temporary directories
/.~tmp~
with copies of original files at every folder on the project while deploying.So the problem is that Apache doesn't have rights to read that folder. Framework tries to load the folder and it contents recursively and gets "Permission denied" error.
Please consider adding some kind of is_readable check to files and directories.
Beta Was this translation helpful? Give feedback.
All reactions