Jump to content
LastNaggets

[Решено] Permission denied in system/library/cache/file.php

Recommended Posts

Версия ocStore 2.1.0.2.1

Сразу после установки системы, в админке такие ошибки

Warning: fopen(/usr/share/nginx/html/shop/system/storage/cache/cache.store.1463053340): failed to open stream: Permission denied in /usr/share/nginx/html/shop/system/library/cache/file.php on line 28Warning: flock() expects parameter 1 to be resource, boolean given in /usr/share/nginx/html/shop/system/library/cache/file.php on line 30Warning: fread() expects parameter 1 to be resource, boolean given in /usr/share/nginx/html/shop/system/library/cache/file.php on line 32Warning: flock() expects parameter 1 to be resource, boolean given in /usr/share/nginx/html/shop/system/library/cache/file.php on line 34Warning: fclose() expects parameter 1 to be resource, boolean given in /usr/share/nginx/html/shop/system/library/cache/file.php on line 36Warning: fopen(/usr/share/nginx/html/shop/system/storage/cache/cache.order_status.1.1463053340): failed to open stream: Permission denied in /usr/share/nginx/html/shop/system/library/cache/file.php on line 28Warning: flock() expects parameter 1 to be resource, boolean given in /usr/share/nginx/html/shop/system/library/cache/file.php on line 30Warning: fread() expects parameter 1 to be resource, boolean given in /usr/share/nginx/html/shop/system/library/cache/file.php on line 32Warning: flock() expects parameter 1 to be resource, boolean given in /usr/share/nginx/html/shop/system/library/cache/file.php on line 34Warning: fclose() expects parameter 1 to be resource, boolean given in /usr/share/nginx/html/shop/system/library/cache/file.php on line 36

Система->Журнал ошибок

2016-05-12 13:42:20 - PHP Warning:  fopen(/usr/share/nginx/html/shop/system/storage/cache/cache.store.1463053191): failed to open stream: Permission denied in /usr/share/nginx/html/shop/system/library/cache/file.php on line 28
2016-05-12 13:42:20 - PHP Warning:  flock() expects parameter 1 to be resource, boolean given in /usr/share/nginx/html/shop/system/library/cache/file.php on line 30
2016-05-12 13:42:20 - PHP Warning:  fread() expects parameter 1 to be resource, boolean given in /usr/share/nginx/html/shop/system/library/cache/file.php on line 32
2016-05-12 13:42:20 - PHP Warning:  flock() expects parameter 1 to be resource, boolean given in /usr/share/nginx/html/shop/system/library/cache/file.php on line 34
2016-05-12 13:42:20 - PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /usr/share/nginx/html/shop/system/library/cache/file.php on line 36
2016-05-12 13:42:20 - PHP Warning:  fopen(/usr/share/nginx/html/shop/system/storage/cache/cache.order_status.1.1463053191): failed to open stream: Permission denied in /usr/share/nginx/html/shop/system/library/cache/file.php on line 28
2016-05-12 13:42:20 - PHP Warning:  flock() expects parameter 1 to be resource, boolean given in /usr/share/nginx/html/shop/system/library/cache/file.php on line 30
2016-05-12 13:42:20 - PHP Warning:  fread() expects parameter 1 to be resource, boolean given in /usr/share/nginx/html/shop/system/library/cache/file.php on line 32
2016-05-12 13:42:20 - PHP Warning:  flock() expects parameter 1 to be resource, boolean given in /usr/share/nginx/html/shop/system/library/cache/file.php on line 34
2016-05-12 13:42:20 - PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /usr/share/nginx/html/shop/system/library/cache/file.php on line 36

Права на system/storage/cache/  777

drwxrwxrwx+ 2 nginx nginx 4096 май 12 13:42 cache
drwxrwxrwx+ 2 nginx nginx   23 апр  2 00:41 download
drwxrwxrwx+ 2 nginx nginx   75 май 12 13:42 logs
drwxrwxrwx+ 2 nginx nginx   23 апр  2 00:41 modification
drwxrwxrwx+ 2 nginx nginx   23 апр  2 00:41 upload

Дело в том, что после того как я задаю права 755 или 777 на папку cahe, всё работает без ошибок буквально 1 секунду

новые кэш файлы там сохраняются с другими правами:

----rw----+ 1 nginx nginx  327 май 12 13:56 cache.language.1463054170
----rw----+ 1 nginx nginx  290 май 12 13:56 cache.length_class.1.1463054170
----rw----+ 1 nginx nginx 1177 май 12 13:59 cache.order_status.1.1463054343
----rw----+ 1 nginx nginx  379 май 12 13:56 cache.stock_status.1.1463054170
----rw----+ 1 nginx nginx    2 май 12 13:59 cache.store.1463054343
----rw----+ 1 nginx nginx  518 май 12 13:56 cache.tax_class.1463054170
----rw----+ 1 nginx nginx  274 май 12 13:56 cache.weight_class.1.1463054170

Подскажите в чём может быть проблема?

Edited by LastNaggets

Share this post


Link to post
Share on other sites

задать вопрос хостеру

Share this post


Link to post
Share on other sites

И ещё, все новые картинки загружаемые при добавлении товаров, сохраняются также с ограниченными правами и не отображаются

----rw----+ 1 nginx nginx 13777 май 12 18:04 file7.jpg

Share this post


Link to post
Share on other sites

 тогда вам на форум  сисадминов. Вопрос к опенкарту никаким боком не относится.

Share this post


Link to post
Share on other sites

если нечего ответить - не флудите пожалуйста

  • +1 1

Share this post


Link to post
Share on other sites

здесь смотрите

Share this post


Link to post
Share on other sites

Может кому поможет в будующем..

Проблема была в недостатке прав юзера от которого работал nginx и php-fpm

Создание нового юзера и добавление его в группу администратора решило проблему

  • +1 1

Share this post


Link to post
Share on other sites

Была такая же проблема. Увеличил размер хостинга.

Share this post


Link to post
Share on other sites

То же столкнулся с такой проблемой. Вылечил увеличением размера хостинга.

Share this post


Link to post
Share on other sites

Спасибо, LastNaggets!

На автомате развернул бэкап root-ом, а не пользователем, на котором висит сайт - думал слетел какой-то модуль.

Share this post


Link to post
Share on other sites

Здравствуйте форумчане. Всех с зимними праздниками!

Постоянно появляются журнале ошибок похожи на такие же ошибки как в первом посте, вот такие ошибки:

 

Цитата

2021-01-11 7:06:00 - PHP Warning:  flock() expects parameter 1 to be resource, boolean given in /var/www/...../data/www/...../system/library/cache/file.php on line 30
2021-01-11 7:06:00 - PHP Warning:  filesize(): stat failed for /var/www/...../data/www/...../storage/cache/cache.article.total.1.0.1.fe25175129461e57e31dedaf0534c733.1610352359 in /var/www/...../data/www/...../system/library/cache/file.php on line 32
2021-01-11 7:06:00 - PHP Warning:  fread() expects parameter 1 to be resource, boolean given in /var/www/...../data/www/...../system/library/cache/file.php on line 32
2021-01-11 7:06:00 - PHP Warning:  flock() expects parameter 1 to be resource, boolean given in /var/www/...../data/www/...../system/library/cache/file.php on line 34
2021-01-11 7:06:00 - PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /var/www/...../data/www/...../system/library/cache/file.php on line 36

Свободно места у меня на хостинге более 4х Гиг, так что это не проблема в размере хостинга. Подскажите пожалуйста, что еще может быть? Данные ошибки лезут постоянно.

Заранее спасибо!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.