laravel centOS 7 chmod 755/775 permission denied“could not be opened: failed to open stream: Permission...











up vote
-1
down vote

favorite












I have linux:




Linux version 3.10.0-693.21.1.el7.x86_64
(builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat
4.8.5-16) (GCC) ) #1 SMP Wed Mar 7 19:03:37 UTC 2018




If I set the permission to 777 on storage, laravel works, but if I set it to 755 or 775 it says:




"The stream or file
"/home/admin/domains/linkshift.eu/public_html/storage/logs/laravel-2018-11-08.log"
could not be opened: failed to open stream: Permission denied"




I have tried searching for an answer, but nothing else worked, I have tried doing
Permissions Issue with Laravel on CentOS
but it still doesn't work



Edit: I also have direct admin installed










share|improve this question









New contributor




Aivaras77 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Stackoverflow is about helping programers. This is more suited for super user community - superuser.com
    – tukan
    Nov 8 at 9:41










  • I am a programmer, I am just trying to host laravel on a dedicated server
    – Aivaras77
    Nov 8 at 9:43










  • But ok I will make a thread there, thank you for the link
    – Aivaras77
    Nov 8 at 9:44










  • I'm not saying, by any means, that you are not programmer. I just think the question does not have any programming question.
    – tukan
    Nov 8 at 10:11















up vote
-1
down vote

favorite












I have linux:




Linux version 3.10.0-693.21.1.el7.x86_64
(builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat
4.8.5-16) (GCC) ) #1 SMP Wed Mar 7 19:03:37 UTC 2018




If I set the permission to 777 on storage, laravel works, but if I set it to 755 or 775 it says:




"The stream or file
"/home/admin/domains/linkshift.eu/public_html/storage/logs/laravel-2018-11-08.log"
could not be opened: failed to open stream: Permission denied"




I have tried searching for an answer, but nothing else worked, I have tried doing
Permissions Issue with Laravel on CentOS
but it still doesn't work



Edit: I also have direct admin installed










share|improve this question









New contributor




Aivaras77 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Stackoverflow is about helping programers. This is more suited for super user community - superuser.com
    – tukan
    Nov 8 at 9:41










  • I am a programmer, I am just trying to host laravel on a dedicated server
    – Aivaras77
    Nov 8 at 9:43










  • But ok I will make a thread there, thank you for the link
    – Aivaras77
    Nov 8 at 9:44










  • I'm not saying, by any means, that you are not programmer. I just think the question does not have any programming question.
    – tukan
    Nov 8 at 10:11













up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I have linux:




Linux version 3.10.0-693.21.1.el7.x86_64
(builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat
4.8.5-16) (GCC) ) #1 SMP Wed Mar 7 19:03:37 UTC 2018




If I set the permission to 777 on storage, laravel works, but if I set it to 755 or 775 it says:




"The stream or file
"/home/admin/domains/linkshift.eu/public_html/storage/logs/laravel-2018-11-08.log"
could not be opened: failed to open stream: Permission denied"




I have tried searching for an answer, but nothing else worked, I have tried doing
Permissions Issue with Laravel on CentOS
but it still doesn't work



Edit: I also have direct admin installed










share|improve this question









New contributor




Aivaras77 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I have linux:




Linux version 3.10.0-693.21.1.el7.x86_64
(builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat
4.8.5-16) (GCC) ) #1 SMP Wed Mar 7 19:03:37 UTC 2018




If I set the permission to 777 on storage, laravel works, but if I set it to 755 or 775 it says:




"The stream or file
"/home/admin/domains/linkshift.eu/public_html/storage/logs/laravel-2018-11-08.log"
could not be opened: failed to open stream: Permission denied"




I have tried searching for an answer, but nothing else worked, I have tried doing
Permissions Issue with Laravel on CentOS
but it still doesn't work



Edit: I also have direct admin installed







linux laravel centos7






share|improve this question









New contributor




Aivaras77 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Aivaras77 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Nov 8 at 10:53





















New contributor




Aivaras77 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 8 at 9:39









Aivaras77

13




13




New contributor




Aivaras77 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Aivaras77 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Aivaras77 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Stackoverflow is about helping programers. This is more suited for super user community - superuser.com
    – tukan
    Nov 8 at 9:41










  • I am a programmer, I am just trying to host laravel on a dedicated server
    – Aivaras77
    Nov 8 at 9:43










  • But ok I will make a thread there, thank you for the link
    – Aivaras77
    Nov 8 at 9:44










  • I'm not saying, by any means, that you are not programmer. I just think the question does not have any programming question.
    – tukan
    Nov 8 at 10:11


















  • Stackoverflow is about helping programers. This is more suited for super user community - superuser.com
    – tukan
    Nov 8 at 9:41










  • I am a programmer, I am just trying to host laravel on a dedicated server
    – Aivaras77
    Nov 8 at 9:43










  • But ok I will make a thread there, thank you for the link
    – Aivaras77
    Nov 8 at 9:44










  • I'm not saying, by any means, that you are not programmer. I just think the question does not have any programming question.
    – tukan
    Nov 8 at 10:11
















Stackoverflow is about helping programers. This is more suited for super user community - superuser.com
– tukan
Nov 8 at 9:41




Stackoverflow is about helping programers. This is more suited for super user community - superuser.com
– tukan
Nov 8 at 9:41












I am a programmer, I am just trying to host laravel on a dedicated server
– Aivaras77
Nov 8 at 9:43




I am a programmer, I am just trying to host laravel on a dedicated server
– Aivaras77
Nov 8 at 9:43












But ok I will make a thread there, thank you for the link
– Aivaras77
Nov 8 at 9:44




But ok I will make a thread there, thank you for the link
– Aivaras77
Nov 8 at 9:44












I'm not saying, by any means, that you are not programmer. I just think the question does not have any programming question.
– tukan
Nov 8 at 10:11




I'm not saying, by any means, that you are not programmer. I just think the question does not have any programming question.
– tukan
Nov 8 at 10:11












2 Answers
2






active

oldest

votes

















up vote
0
down vote













Look like the log file is generated using root user and you are running the laravel from a different user. Make sure the log file is written by same user. Or give permission to your user.



sudo chown -R laravel-user:laravel-user /path/to/your/laravel/root/directory


Run these commands after every deploy



chmod -R 775 storage/framework
chmod -R 775 storage/logs
chmod -R 775 bootstrap/cache


Still If not working, It can maybe also because of SELinux.



Check selinux status on terminal:



sestatus


If status is enabled, write command for disable SElinux( Not reccommended)



setenforce Permissive


or you can do linke below.



yum install policycoreutils-python -y # might not be necessary, try the below first

semanage fcontext -a -t httpd_sys_rw_content_t "/path/to/your/laravel/root/directory/storage(/.*)?" # add a new httpd read write content to sellinux for the specific folder, -m for modify
semanage fcontext -a -t httpd_sys_rw_content_t "/path/to/your/laravel/root/directory/bootstrap/cache(/.*)?" # same as the above for b/cache

restorecon -Rv /var/www/html/ # this command is very important to, it's like a restart to apply the new rules


Selinux is intended to restrict access even to root users, so only the necessary stuff might be accessed, at least on a generalist overview, it's extra security, disabling it is not a good practise, there are many links to learn Selinux, but for this case it is not even required.






share|improve this answer























  • How can I do that? How do I check which user it is ran by?
    – Aivaras77
    Nov 8 at 10:16










  • See the updated answer
    – Jestin Sebastian
    Nov 8 at 10:34










  • setenforce: SELinux is disabled and it still does not work, should I try to turn it on and then run the commands?
    – Aivaras77
    Nov 8 at 10:46










  • Run this sudo chown -R laravel-user:laravel-user /path/to/your/laravel/root/directory
    – Jestin Sebastian
    Nov 8 at 10:48










  • Also I am running it on super user, I have not created any users
    – Aivaras77
    Nov 8 at 10:48


















up vote
-1
down vote













Could you show the result of



ls -l /home/admin/domains/linkshift.eu/public_html/storage/logs


and have you tried



php artisan config:cache
php artisan config:clear
composer dump-autoload -o





share|improve this answer























  • total 16 -rwxrwxrwx. 1 apache apache 14827 Nov 8 03:02 laravel-2018-11-08.log
    – Aivaras77
    Nov 8 at 10:16










  • I tried everything after doing chmod -R 775 storage, but still The stream or file "/home/admin/domains/linkshift.eu/public_html/storage/logs/laravel-2018-11-08.log" could not be opened: failed to open stream: Permission denied
    – Aivaras77
    Nov 8 at 10:19










  • to confirm the name of user of your http server (which is assumed to be apache:apache here), try delete laravel-2018-11-09.log, and set the permission to 777 on storage again, then trigger a execution which writes logs to let apache create a new laravel-2018-11-09.log, and then do ls -l again to see its ownership?
    – Mou Hsiao
    Nov 8 at 16:38












  • "total 0" is the output after I did what you said
    – Aivaras77
    Nov 8 at 18:43











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Aivaras77 is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53205011%2flaravel-centos-7-chmod-755-775-permission-deniedcould-not-be-opened-failed-to%23new-answer', 'question_page');
}
);

Post as a guest
































2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













Look like the log file is generated using root user and you are running the laravel from a different user. Make sure the log file is written by same user. Or give permission to your user.



sudo chown -R laravel-user:laravel-user /path/to/your/laravel/root/directory


Run these commands after every deploy



chmod -R 775 storage/framework
chmod -R 775 storage/logs
chmod -R 775 bootstrap/cache


Still If not working, It can maybe also because of SELinux.



Check selinux status on terminal:



sestatus


If status is enabled, write command for disable SElinux( Not reccommended)



setenforce Permissive


or you can do linke below.



yum install policycoreutils-python -y # might not be necessary, try the below first

semanage fcontext -a -t httpd_sys_rw_content_t "/path/to/your/laravel/root/directory/storage(/.*)?" # add a new httpd read write content to sellinux for the specific folder, -m for modify
semanage fcontext -a -t httpd_sys_rw_content_t "/path/to/your/laravel/root/directory/bootstrap/cache(/.*)?" # same as the above for b/cache

restorecon -Rv /var/www/html/ # this command is very important to, it's like a restart to apply the new rules


Selinux is intended to restrict access even to root users, so only the necessary stuff might be accessed, at least on a generalist overview, it's extra security, disabling it is not a good practise, there are many links to learn Selinux, but for this case it is not even required.






share|improve this answer























  • How can I do that? How do I check which user it is ran by?
    – Aivaras77
    Nov 8 at 10:16










  • See the updated answer
    – Jestin Sebastian
    Nov 8 at 10:34










  • setenforce: SELinux is disabled and it still does not work, should I try to turn it on and then run the commands?
    – Aivaras77
    Nov 8 at 10:46










  • Run this sudo chown -R laravel-user:laravel-user /path/to/your/laravel/root/directory
    – Jestin Sebastian
    Nov 8 at 10:48










  • Also I am running it on super user, I have not created any users
    – Aivaras77
    Nov 8 at 10:48















up vote
0
down vote













Look like the log file is generated using root user and you are running the laravel from a different user. Make sure the log file is written by same user. Or give permission to your user.



sudo chown -R laravel-user:laravel-user /path/to/your/laravel/root/directory


Run these commands after every deploy



chmod -R 775 storage/framework
chmod -R 775 storage/logs
chmod -R 775 bootstrap/cache


Still If not working, It can maybe also because of SELinux.



Check selinux status on terminal:



sestatus


If status is enabled, write command for disable SElinux( Not reccommended)



setenforce Permissive


or you can do linke below.



yum install policycoreutils-python -y # might not be necessary, try the below first

semanage fcontext -a -t httpd_sys_rw_content_t "/path/to/your/laravel/root/directory/storage(/.*)?" # add a new httpd read write content to sellinux for the specific folder, -m for modify
semanage fcontext -a -t httpd_sys_rw_content_t "/path/to/your/laravel/root/directory/bootstrap/cache(/.*)?" # same as the above for b/cache

restorecon -Rv /var/www/html/ # this command is very important to, it's like a restart to apply the new rules


Selinux is intended to restrict access even to root users, so only the necessary stuff might be accessed, at least on a generalist overview, it's extra security, disabling it is not a good practise, there are many links to learn Selinux, but for this case it is not even required.






share|improve this answer























  • How can I do that? How do I check which user it is ran by?
    – Aivaras77
    Nov 8 at 10:16










  • See the updated answer
    – Jestin Sebastian
    Nov 8 at 10:34










  • setenforce: SELinux is disabled and it still does not work, should I try to turn it on and then run the commands?
    – Aivaras77
    Nov 8 at 10:46










  • Run this sudo chown -R laravel-user:laravel-user /path/to/your/laravel/root/directory
    – Jestin Sebastian
    Nov 8 at 10:48










  • Also I am running it on super user, I have not created any users
    – Aivaras77
    Nov 8 at 10:48













up vote
0
down vote










up vote
0
down vote









Look like the log file is generated using root user and you are running the laravel from a different user. Make sure the log file is written by same user. Or give permission to your user.



sudo chown -R laravel-user:laravel-user /path/to/your/laravel/root/directory


Run these commands after every deploy



chmod -R 775 storage/framework
chmod -R 775 storage/logs
chmod -R 775 bootstrap/cache


Still If not working, It can maybe also because of SELinux.



Check selinux status on terminal:



sestatus


If status is enabled, write command for disable SElinux( Not reccommended)



setenforce Permissive


or you can do linke below.



yum install policycoreutils-python -y # might not be necessary, try the below first

semanage fcontext -a -t httpd_sys_rw_content_t "/path/to/your/laravel/root/directory/storage(/.*)?" # add a new httpd read write content to sellinux for the specific folder, -m for modify
semanage fcontext -a -t httpd_sys_rw_content_t "/path/to/your/laravel/root/directory/bootstrap/cache(/.*)?" # same as the above for b/cache

restorecon -Rv /var/www/html/ # this command is very important to, it's like a restart to apply the new rules


Selinux is intended to restrict access even to root users, so only the necessary stuff might be accessed, at least on a generalist overview, it's extra security, disabling it is not a good practise, there are many links to learn Selinux, but for this case it is not even required.






share|improve this answer














Look like the log file is generated using root user and you are running the laravel from a different user. Make sure the log file is written by same user. Or give permission to your user.



sudo chown -R laravel-user:laravel-user /path/to/your/laravel/root/directory


Run these commands after every deploy



chmod -R 775 storage/framework
chmod -R 775 storage/logs
chmod -R 775 bootstrap/cache


Still If not working, It can maybe also because of SELinux.



Check selinux status on terminal:



sestatus


If status is enabled, write command for disable SElinux( Not reccommended)



setenforce Permissive


or you can do linke below.



yum install policycoreutils-python -y # might not be necessary, try the below first

semanage fcontext -a -t httpd_sys_rw_content_t "/path/to/your/laravel/root/directory/storage(/.*)?" # add a new httpd read write content to sellinux for the specific folder, -m for modify
semanage fcontext -a -t httpd_sys_rw_content_t "/path/to/your/laravel/root/directory/bootstrap/cache(/.*)?" # same as the above for b/cache

restorecon -Rv /var/www/html/ # this command is very important to, it's like a restart to apply the new rules


Selinux is intended to restrict access even to root users, so only the necessary stuff might be accessed, at least on a generalist overview, it's extra security, disabling it is not a good practise, there are many links to learn Selinux, but for this case it is not even required.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 8 at 10:40

























answered Nov 8 at 10:00









Jestin Sebastian

19610




19610












  • How can I do that? How do I check which user it is ran by?
    – Aivaras77
    Nov 8 at 10:16










  • See the updated answer
    – Jestin Sebastian
    Nov 8 at 10:34










  • setenforce: SELinux is disabled and it still does not work, should I try to turn it on and then run the commands?
    – Aivaras77
    Nov 8 at 10:46










  • Run this sudo chown -R laravel-user:laravel-user /path/to/your/laravel/root/directory
    – Jestin Sebastian
    Nov 8 at 10:48










  • Also I am running it on super user, I have not created any users
    – Aivaras77
    Nov 8 at 10:48


















  • How can I do that? How do I check which user it is ran by?
    – Aivaras77
    Nov 8 at 10:16










  • See the updated answer
    – Jestin Sebastian
    Nov 8 at 10:34










  • setenforce: SELinux is disabled and it still does not work, should I try to turn it on and then run the commands?
    – Aivaras77
    Nov 8 at 10:46










  • Run this sudo chown -R laravel-user:laravel-user /path/to/your/laravel/root/directory
    – Jestin Sebastian
    Nov 8 at 10:48










  • Also I am running it on super user, I have not created any users
    – Aivaras77
    Nov 8 at 10:48
















How can I do that? How do I check which user it is ran by?
– Aivaras77
Nov 8 at 10:16




How can I do that? How do I check which user it is ran by?
– Aivaras77
Nov 8 at 10:16












See the updated answer
– Jestin Sebastian
Nov 8 at 10:34




See the updated answer
– Jestin Sebastian
Nov 8 at 10:34












setenforce: SELinux is disabled and it still does not work, should I try to turn it on and then run the commands?
– Aivaras77
Nov 8 at 10:46




setenforce: SELinux is disabled and it still does not work, should I try to turn it on and then run the commands?
– Aivaras77
Nov 8 at 10:46












Run this sudo chown -R laravel-user:laravel-user /path/to/your/laravel/root/directory
– Jestin Sebastian
Nov 8 at 10:48




Run this sudo chown -R laravel-user:laravel-user /path/to/your/laravel/root/directory
– Jestin Sebastian
Nov 8 at 10:48












Also I am running it on super user, I have not created any users
– Aivaras77
Nov 8 at 10:48




Also I am running it on super user, I have not created any users
– Aivaras77
Nov 8 at 10:48












up vote
-1
down vote













Could you show the result of



ls -l /home/admin/domains/linkshift.eu/public_html/storage/logs


and have you tried



php artisan config:cache
php artisan config:clear
composer dump-autoload -o





share|improve this answer























  • total 16 -rwxrwxrwx. 1 apache apache 14827 Nov 8 03:02 laravel-2018-11-08.log
    – Aivaras77
    Nov 8 at 10:16










  • I tried everything after doing chmod -R 775 storage, but still The stream or file "/home/admin/domains/linkshift.eu/public_html/storage/logs/laravel-2018-11-08.log" could not be opened: failed to open stream: Permission denied
    – Aivaras77
    Nov 8 at 10:19










  • to confirm the name of user of your http server (which is assumed to be apache:apache here), try delete laravel-2018-11-09.log, and set the permission to 777 on storage again, then trigger a execution which writes logs to let apache create a new laravel-2018-11-09.log, and then do ls -l again to see its ownership?
    – Mou Hsiao
    Nov 8 at 16:38












  • "total 0" is the output after I did what you said
    – Aivaras77
    Nov 8 at 18:43















up vote
-1
down vote













Could you show the result of



ls -l /home/admin/domains/linkshift.eu/public_html/storage/logs


and have you tried



php artisan config:cache
php artisan config:clear
composer dump-autoload -o





share|improve this answer























  • total 16 -rwxrwxrwx. 1 apache apache 14827 Nov 8 03:02 laravel-2018-11-08.log
    – Aivaras77
    Nov 8 at 10:16










  • I tried everything after doing chmod -R 775 storage, but still The stream or file "/home/admin/domains/linkshift.eu/public_html/storage/logs/laravel-2018-11-08.log" could not be opened: failed to open stream: Permission denied
    – Aivaras77
    Nov 8 at 10:19










  • to confirm the name of user of your http server (which is assumed to be apache:apache here), try delete laravel-2018-11-09.log, and set the permission to 777 on storage again, then trigger a execution which writes logs to let apache create a new laravel-2018-11-09.log, and then do ls -l again to see its ownership?
    – Mou Hsiao
    Nov 8 at 16:38












  • "total 0" is the output after I did what you said
    – Aivaras77
    Nov 8 at 18:43













up vote
-1
down vote










up vote
-1
down vote









Could you show the result of



ls -l /home/admin/domains/linkshift.eu/public_html/storage/logs


and have you tried



php artisan config:cache
php artisan config:clear
composer dump-autoload -o





share|improve this answer














Could you show the result of



ls -l /home/admin/domains/linkshift.eu/public_html/storage/logs


and have you tried



php artisan config:cache
php artisan config:clear
composer dump-autoload -o






share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 8 at 10:05

























answered Nov 8 at 9:54









Mou Hsiao

344




344












  • total 16 -rwxrwxrwx. 1 apache apache 14827 Nov 8 03:02 laravel-2018-11-08.log
    – Aivaras77
    Nov 8 at 10:16










  • I tried everything after doing chmod -R 775 storage, but still The stream or file "/home/admin/domains/linkshift.eu/public_html/storage/logs/laravel-2018-11-08.log" could not be opened: failed to open stream: Permission denied
    – Aivaras77
    Nov 8 at 10:19










  • to confirm the name of user of your http server (which is assumed to be apache:apache here), try delete laravel-2018-11-09.log, and set the permission to 777 on storage again, then trigger a execution which writes logs to let apache create a new laravel-2018-11-09.log, and then do ls -l again to see its ownership?
    – Mou Hsiao
    Nov 8 at 16:38












  • "total 0" is the output after I did what you said
    – Aivaras77
    Nov 8 at 18:43


















  • total 16 -rwxrwxrwx. 1 apache apache 14827 Nov 8 03:02 laravel-2018-11-08.log
    – Aivaras77
    Nov 8 at 10:16










  • I tried everything after doing chmod -R 775 storage, but still The stream or file "/home/admin/domains/linkshift.eu/public_html/storage/logs/laravel-2018-11-08.log" could not be opened: failed to open stream: Permission denied
    – Aivaras77
    Nov 8 at 10:19










  • to confirm the name of user of your http server (which is assumed to be apache:apache here), try delete laravel-2018-11-09.log, and set the permission to 777 on storage again, then trigger a execution which writes logs to let apache create a new laravel-2018-11-09.log, and then do ls -l again to see its ownership?
    – Mou Hsiao
    Nov 8 at 16:38












  • "total 0" is the output after I did what you said
    – Aivaras77
    Nov 8 at 18:43
















total 16 -rwxrwxrwx. 1 apache apache 14827 Nov 8 03:02 laravel-2018-11-08.log
– Aivaras77
Nov 8 at 10:16




total 16 -rwxrwxrwx. 1 apache apache 14827 Nov 8 03:02 laravel-2018-11-08.log
– Aivaras77
Nov 8 at 10:16












I tried everything after doing chmod -R 775 storage, but still The stream or file "/home/admin/domains/linkshift.eu/public_html/storage/logs/laravel-2018-11-08.log" could not be opened: failed to open stream: Permission denied
– Aivaras77
Nov 8 at 10:19




I tried everything after doing chmod -R 775 storage, but still The stream or file "/home/admin/domains/linkshift.eu/public_html/storage/logs/laravel-2018-11-08.log" could not be opened: failed to open stream: Permission denied
– Aivaras77
Nov 8 at 10:19












to confirm the name of user of your http server (which is assumed to be apache:apache here), try delete laravel-2018-11-09.log, and set the permission to 777 on storage again, then trigger a execution which writes logs to let apache create a new laravel-2018-11-09.log, and then do ls -l again to see its ownership?
– Mou Hsiao
Nov 8 at 16:38






to confirm the name of user of your http server (which is assumed to be apache:apache here), try delete laravel-2018-11-09.log, and set the permission to 777 on storage again, then trigger a execution which writes logs to let apache create a new laravel-2018-11-09.log, and then do ls -l again to see its ownership?
– Mou Hsiao
Nov 8 at 16:38














"total 0" is the output after I did what you said
– Aivaras77
Nov 8 at 18:43




"total 0" is the output after I did what you said
– Aivaras77
Nov 8 at 18:43










Aivaras77 is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















Aivaras77 is a new contributor. Be nice, and check out our Code of Conduct.













Aivaras77 is a new contributor. Be nice, and check out our Code of Conduct.












Aivaras77 is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53205011%2flaravel-centos-7-chmod-755-775-permission-deniedcould-not-be-opened-failed-to%23new-answer', 'question_page');
}
);

Post as a guest




















































































Popular posts from this blog

Schultheiß

Verwaltungsgliederung Dänemarks

Liste der Kulturdenkmale in Wilsdruff