Jail: crontab and permission issue

Hi all, im having 2 issue that i try to fix but i can’t solve alone, need your precious help :slight_smile:

first problem, regarding a jail where i install heimdall: after some debug due to permission problem, i figure that for work properly, the owner of the /usr/local/www folder must be the www user, so i run those 2 commands:
chown -R www /usr/local/www
chmod -R 0755 /usr/local/www
and all work fine… until the owner is changed by i don’t know process and need to launch those command again… what’s happening? Only this jail seems affected, and i try reinstall many times.

second problem, regarding a jail whit nextcloud: got some warning in the console, that i manage to fix, except one:

Last background job execution ran * . Something seems wrong

after some research, i figured to
crontab -u www -e
insert into the editor
*/5 * * * * www php -f /usr/local/www/nextcloud/cron.php
and save. If i manually launch
sudo -u www php -f /usr/local/www/nextcloud/cron.php
the error in management console disappear for an hour, like the crontab isn’t working properly. What i’m doing wrong?

thanks to all

/usr/local/www belongs to root:wheel in FreeBSD. Every time you do e.g. a pkg upgrade that will be reset.

I recommend creating a subfolder below /usr/local/www as all ports/packages do by default.

Your crontab issue is due to the fact that you did not invoke PHP with the full path.
Replace php with /usr/local/bin/php and it should work.

Thanks for the fast reply!

This is clear (to me appears completely random xD)

Sorry but im not understanding this, what i have to do exactly (i used the script for install heimdall available on resource)

Done, in an hour i will know if work :smiley:

Unlucky the change made on the path for invoking PHP not fix the problem, it still work only on direct launch the command

If you use “crontab -u www”, you must not specify the www user inside the crontab entry. Remove the “www” in that line.


finally working :smiley: :smiley: thanks a lot for the tips!