Permission Issue

Well, you would need to check the various locations. For example, use the steps you previously used to setup the cron job. If you edit your crontab with your www-data user and it doesn’t have anything configured, then you know that was edited with the regular user. You would then need to create the cron job with your www-data user and delete the duplicate ones with your regular user.

For example, the following is what my crontab looks like:

#InvoiceNinja
0 8 * * * /usr/bin/php8.3 /var/www/invoiceninja/artisan ninja:send-recurring > /dev/null
0 8 * * * /usr/bin/php8.3 /var/www/invoiceninja/artisan ninja:send-reminders > /dev/null
* * * * * cd /var/www/invoiceninja/artisan && /usr/bin/php8.3 artisan schedule:run >> /dev/null 2>&1

You can see from the above, that I am using PHP8.3. You should make sure yours is set for PHP8.2 (if that’s what you are using).

If you are using nginx, you should make sure that it is referencing your correct version of PHP in the nginx config file. It’s been a very long time since I have used apache2, so I don’t remember if there is a PHP reference there. As @hillel often recommends, you could also create a temporary php info page to check which is being used.

I correct my previous message. There is no reference to the PHP version in your .env file. I’d remembered that incorrectly.

Well, if you are running on Ubuntu/Debian the recommended way is as follows. Use at your own risk and only if you know what you are doing!! I assume no responsibility if you are unfamiliar with the following.

sudo apt purge php8.1
sudo apt autoclean
sudo apt autoremove

You can also run either (or both) of the following to see what php is installed (or at least might be installed). There are many way to do this, these are just two simple ways.
ls -la /etc/php
or
apt search php
The latter will list every single package related to php in the Ubuntu/Debian repositories, so there may be a lot to scroll through. When you scroll through the list you should see something similar to below, but for the versions of PHP on your machine. It may require a lot of scrolling to get to PHP8.1 or PHP8.2. You could also just list your installed packages apt list --installed and scroll up to PHP. You should see something to the following if it is installed on your machine.

php8.3/noble,now 8.3.6-0maysync1 all [installed]
  server-side, HTML-embedded scripting language (metapackage)

Don’t worry about permissions right now. Make sure those things are fixed first. There may be other locations that should be checked, but that is what I remember at the moment. If you do have snappdf installed, make sure you go through the InvoiceNinja directions carefully to ensure it’s installed correctly.