Y
Y
yischyk2020-04-28 11:46:48
PHP
yischyk, 2020-04-28 11:46:48

Run cron. Access is denied?

there is a command cd /var/www/no-name/data/www/oushd.ru/core/channels/channels/ && /var/www/no-name/data/www/oushd.ru/core/channels/channels/ test.php
resulting in error
root# /var/www/no-name/data/www/oushd.ru/core/channels/channels/ && /var/www/no-name/data/www/oushd.ru/ core/channels/channels/channels.php
/bin/sh: 1: /var/www/no-name/data/www/oushd.ru/core/channels/channels/channels.php: Permission denied

how to solve? I understand that the problem is in the denial of access to the file

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vamp, 2020-04-28
@yischyk

You need to explicitly call the php interpreter and pass it the path to the script:

cd /var/www/no-name/data/www/oushd.ru/core/channels/channels/ && php /var/www/no-name/data/www/oushd.ru/core/channels/channels/test.php

cd /var/www/no-name/data/www/oushd.ru/core/channels/channels/ && php /var/www/no-name/data/www/oushd.ru/core/channels/channels/channels.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question