• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

Need some help getting cron working

Version
4.0.4
Website URL
https://pic.mlcnfriends.com/
PHP version
8.0
Database driver
MySQL
Database version
Mariadb10.3
Web browser
Firefox

Jailer

Chevereto Member
So I added my crontab entry per the documentation. Since I've never had cron working on my system I figured I'd run the command from a shell and see if it runs. What it returns is something I'm not familiar with. This is on a FreeBSD machine and Chevereto is installed in a jail so the file paths look different from a usual linux install.

Code:
jailer@chevereto:/ % php /usr/local/www/nginx/app/bin/legacy -C cron

vdd()
------------------------------------------------------------
/usr/local/www/nginx/app/legacy/load/integrity-check.php:158

Arg•0 array (size=2)
0 => string No write permission for PHP user root in <code>/content/</code> directory. Chevereto needs to be able to write in this directory. (length=129)
1 => string No write permission for PHP user root in <code>/app/content/</code> directory. Chevereto needs to be able to write in this directory. (length=133)
------------------------------------------------------------

What does this mean? It's seems to be a permissions issue but for where? Where is it trying to write to and more improtantly how do I fix it?
 
Just for some added info I checked permissions on the 2 directories listed in the error message. The php user in FreeBSD is www so it looks like file ownership is correct.

Code:
jailer@chevereto:/ % ls -l /usr/local/www/nginx/app
total 443
drwxr-xr-x   2 www  www       7 Nov 22 13:52 apache
-rw-r--r--   1 www  www     123 Oct  6 17:12 app.php
drwxr-xr-x   2 www  www       4 Nov 22 13:52 bin
-rw-r--r--   1 www  www     741 Oct  6 17:12 chevereto-hook.sample.php
-rw-r--r--   1 www  www    3155 Nov 18 16:06 composer.json
-rw-r--r--   1 www  www  368645 Nov 18 16:06 composer.lock
-rw-r--r--   1 www  www    2118 Nov 18 16:06 configurator.php
drwxr-xr-x   5 www  www       5 Jul  6  2017 content
-rw-r--r--   1 www  www    2853 Oct  6 17:12 cron.php
-rw-r--r--   1 www  www    2121 Nov 18 16:06 env-default.php
-rw-r--r--   1 www  www     435 Nov 23 21:36 env.php
-rw-r--r--   1 www  www    1344 Oct  6 17:12 htaccess-checksum.php
-rw-r--r--   1 www  www    1352 Oct  6 17:12 htaccess-enforce.php
drwxr-xr-x   3 www  www       3 Nov 10  2018 importer
-rw-r--r--   1 www  www    1275 Oct  6 17:12 importing.php
drwxr-xr-x   6 www  www       7 Jul 31  2021 install
-rw-r--r--   1 www  www     800 Oct  6 17:12 install.php
-rw-r--r--   1 www  www    1808 Oct  6 17:12 langs.php
drwxr-xr-x   2 www  www      37 Nov 22 13:52 languages
drwxr-xr-x   7 www  www       7 Nov 22 13:52 legacy
drwxr-xr-x   3 www  www      10 Jul 31  2021 lib
drwxr-xr-x   2 www  www       4 Jul  2  2017 license
-rw-r--r--   1 www  www   10993 Oct  6 17:12 loader.php
-rw-r--r--   1 www  www    1315 Nov 18 16:06 phpstan-bootstrap.php
-rw-r--r--   1 www  www     210 Nov 18 16:06 phpstan.neon
-rw-r--r--   1 www  www     694 Oct  6 17:12 pre-autoload.php
-rw-r--r--   1 www  www    1135 Nov 18 16:06 rector.php
drwxr-xr-x   3 www  www      31 Sep 19  2020 routes
drwxr-xr-x   2 www  www       7 Nov 22 13:52 routing
drwxr-xr-x   4 www  www       4 Nov 22 13:52 schemas
-rw-r--r--   1 www  www     952 Oct  6 17:12 setting-update.php
-rw-r--r--   1 www  www     290 May 21  2018 settings.php
drwxr-xr-x  18 www  www      18 Nov 22 13:52 src
drwxr-xr-x   3 www  www       3 Jul  2  2017 themes
-rw-r--r--   1 www  www     900 Oct  6 17:12 update.php
drwxr-xr-x  62 www  www      63 Nov 22 13:53 vendor
-rw-r--r--   1 www  www   20798 Oct  6 17:12 web.php

Code:
jailer@chevereto:/ % ls -l /usr/local/www/nginx/app/content
total 34
drwxr-xr-x  4 www  www  44 Jan 16  2021 languages
drwxr-xr-x  2 www  www   2 Sep 19  2020 locks
drwxr-xr-x  2 www  www   9 Jul 31  2021 system
 
I'm running the command with my user account, jailer. It won't run if you try to run it as root.

If I'm running the command from a user account calling php and php runs as root how do I change that so it runs as www?
 
Got it working. Had to install sudo and add
Code:
sudo -u www
to the command. The entire output for cron to run for me on FreeBSD is:

Code:
sudo -u www php /usr/local/www/nginx/app/bin/legacy -C cron

ETA: Is it normal for the time the last cron task was run in the dashboard to be displayed in UTC time format? It doesn't match the timezone that I'm in and what I have it set to.
 
Last edited:
Back
Top