2017-04-14 1 views
0

내가 등록하려고 할 때 사용자에게 전자 메일을 보내려고하면이 오류가 발생합니다. 그것은 어제까지 일하고 있었다. 오늘부터 그것은 나에게 이것을 준다. 그리고 나는 이유를 이해할 수 없다. 로컬 테스트에서이 작업이 진행됩니다. 나는 붙어있다. 당신이 Laravel 특정 디렉토리에 쓰기 권한이 필요가 자신을 생각 나게한다 failed to open stream: Permission denied', '/var/www/html/bootstrap/cache 같은 것을 볼 때마다사용 권한이 거부되었습니다. Laravel linux server

ErrorException in compiled.php line 7512: 
file_put_contents(/var/www/html/storage/framework/views/53de219dee4f11a2db4f64a2c574ad02db5613f4.php): failed to open stream: Permission denied 
in compiled.php line 7512 
at HandleExceptions->handleError('2', 'file_put_contents(/var/www/html/storage/framework/views/53de219dee4f11a2db4f64a2c574ad02db5613f4.php): failed to open stream: Permission denied', '/var/www/html/bootstrap/cache/compiled.php', '7512', array('path' => '/var/www/html/storage/framework/views/53de219dee4f11a2db4f64a2c574ad02db5613f4.php', 'contents' => 'Please activate your account by clicking on the following link. <a href="<?php echo e(route('auth.activate', $token)); ?>"><?php echo e(route('auth.activate', $token)); ?></a> ', 'lock' => false)) 
at file_put_contents('/var/www/html/storage/framework/views/53de219dee4f11a2db4f64a2c574ad02db5613f4.php', 'Please activate your account by clicking on the following link. <a href="<?php echo e(route('auth.activate', $token)); ?>"><?php echo e(route('auth.activate', $token)); ?></a> ', '0') in compiled.php line 7512 
at Filesystem->put('/var/www/html/storage/framework/views/53de219dee4f11a2db4f64a2c574ad02db5613f4.php', 'Please activate your account by clicking on the following link. <a href="<?php echo e(route('auth.activate', $token)); ?>"><?php echo e(route('auth.activate', $token)); ?></a> ') in compiled.php line 15769 
at BladeCompiler->compile('/var/www/html/resources/views/email/auth/activation.blade.php') in compiled.php line 15682 
at CompilerEngine->get('/var/www/html/resources/views/email/auth/activation.blade.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'token' => object(ActivationToken), 'activeToken' => null, 'connection' => null, 'queue' => null, 'delay' => null, 'message' => object(Message))) in compiled.php line 15517 
at View->getContents() in compiled.php line 15505 
at View->renderContents() in compiled.php line 15489 
at View->render() in Mailer.php line 458 
at Mailer->getView('email.auth.activation', array('token' => object(ActivationToken), 'activeToken' => null, 'connection' => null, 'queue' => null, 'delay' => null, 'message' => object(Message))) in Mailer.php line 331 
at Mailer->addContent(object(Message), 'email.auth.activation', null, null, array('token' => object(ActivationToken), 'activeToken' => null, 'connection' => null, 'queue' => null, 'delay' => null, 'message' => object(Message))) in Mailer.php line 205 
at Mailer->send('email.auth.activation', array('token' => object(ActivationToken), 'activeToken' => null, 'connection' => null, 'queue' => null, 'delay' => null, 'message' => object(Message)), object(Closure)) in Mailable.php line 117 
at Mailable->send(object(Mailer)) in Mailer.php line 192 
at Mailer->send(object(SendActivationToken)) in MailableMailer.php line 99 
at MailableMailer->send(object(SendActivationToken)) in SendActivationEmail.php line 30 
at SendActivationEmail->handle(object(UserRegistered)) 
at call_user_func_array(array(object(SendActivationEmail), 'handle'), array(object(UserRegistered))) in compiled.php line 10332 
at Dispatcher->Illuminate\Events\{closure}(object(UserRegistered)) 
at call_user_func_array(object(Closure), array(object(UserRegistered))) in compiled.php line 10266 
at Dispatcher->fire('App\Events\UserRegistered') in helpers.php line 480 
at event(object(UserRegistered)) in AppServiceProvider.php line 25 
at AppServiceProvider->App\Providers\{closure}(object(User)) 
at call_user_func_array(object(Closure), array(object(User))) in compiled.php line 10266 
at Dispatcher->fire('eloquent.created: App\User', array(object(User))) in compiled.php line 11029 
at Model->fireModelEvent('eloquent.created: App\User', false) in compiled.php line 10996 
at Model->performInsert(object(Builder)) in compiled.php line 10941 
at Model->save() in compiled.php line 10599 
at Model::create(array('name' => 'Alessandro Mazari', 'surname' => 'Mazari', 'email' => '[email protected]', 'password' => '$2y$10$R/lwIQ5.dgNgArYE3AuyGeDSyUWoILtnT2LvrDGNjV9aDevj9/Xnq', 'hidden_profile' => 'off', 'faction' => 'soon', 'mac_address_handlebar' => '', 'active' => false)) in RegisterController.php line 76 
at RegisterController->create(array('_token' => 'Jeh3Amk6XGHDiFz5fqYyBIGYGblbNlZxwzM9r4lJ', 'name' => 'Alessandro Mazari', 'surname' => 'Mazari', 'email' => '[email protected]', 'password' => 'alessa', 'password_confirmation' => 'alessa', 'faction' => 'soon', 'mac_address_handlebar' => '', 'hidden_profile' => 'off')) in compiled.php line 2695 
at RegisterController->register(object(Request)) 
at call_user_func_array(array(object(RegisterController), 'register'), array(object(Request))) in compiled.php line 9584 
at Controller->callAction('register', array(object(Request))) in compiled.php line 9611 
at ControllerDispatcher->dispatch(object(Route), object(RegisterController), 'register') in compiled.php line 8665 
at Route->runController() in compiled.php line 8646 
at Route->run(object(Request)) in compiled.php line 8355 
at Router->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 53 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in RedirectIfAuthenticated.php line 24 
at RedirectIfAuthenticated->handle(object(Request), object(Closure)) in compiled.php line 10069 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 10177 
at SubstituteBindings->handle(object(Request), object(Closure)) in compiled.php line 10069 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 3312 
at VerifyCsrfToken->handle(object(Request), object(Closure)) in compiled.php line 10069 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 13749 
at ShareErrorsFromSession->handle(object(Request), object(Closure)) in compiled.php line 10069 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 12155 
at StartSession->handle(object(Request), object(Closure)) in compiled.php line 10069 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 13495 
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in compiled.php line 10069 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 13432 
at EncryptCookies->handle(object(Request), object(Closure)) in compiled.php line 10069 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 10054 
at Pipeline->then(object(Closure)) in compiled.php line 8356 
at Router->runRouteWithinStack(object(Route), object(Request)) in compiled.php line 8347 
at Router->dispatchToRoute(object(Request)) in compiled.php line 8338 
at Router->dispatch(object(Request)) in compiled.php line 2575 
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 53 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 3374 
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in compiled.php line 10069 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 10054 
at Pipeline->then(object(Closure)) in compiled.php line 2519 
at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2503 
at Kernel->handle(object(Request)) in index.php line 53 
+0

체크 폴더 사용 권한을 도움이되기를 바랍니다. –

+0

그 말은 * 스트림을 열지 못했습니다 : 허가가 거부되었습니다 * –

+0

프로세스가 특정보기 파일 ('/ var/www/html/storage/framework/views/53de219dee4f11a2db4f64a2c574ad02db5613f4.php')에 대한 사용 권한이 충분하지 않은 것 같습니다. 그것이 맞는지 확인하십시오. –

답변

0

최근에 stackoverflow에 가입했기 때문에 댓글을 달 수 없으며 충분한 크레딧이 없어 답변을 게시 할 수 있습니다.

Laravel에는 저장 폴더 (및이 폴더 만)에 대한 쓰기 권한이 필요합니다. 그래서 실행하십시오

sudo chmod -R 7777 storage 

내가, 관련,

+0

하지만 왜 지금부터해야합니까? 어제 괜찮 았던 일이 없으면 – McMazalf

+0

고마워요. – McMazalf

+0

정말 환영합니다. 폴더 권한이 복원 된 것 같습니다. 따라서이 폴더에 대해 laravel에 대한 쓰기 권한을 부여해야합니다. 답변이 도움이 되었다면 동의하십시오. 감사. –

0

을 기쁘게 도와주세요.

Directory 사용 권한

Laravel를 설치 한 후, 당신은 몇 가지 권한을 구성해야 할 수 있습니다

:

sudo chmod 777 dir_name는 문서를 인용 여기 :)

당신의 친구입니다. 저장소 내의 디렉토리 및 부트 스트랩/캐시 디렉토리 은 웹 서버에서 쓰기 가능해야하며 그렇지 않으면 Laravel이 실행되지 않습니다.

+0

고마워요! 그것은 작동했습니다 – McMazalf

관련 문제