thank you, this resolved my problem without having to delete the .htaccess file
The solution to this problem is with this code.
sudo find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + sudo find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + sudo chown -R user_name:www-data . sudo chmod u+x bin/magento
sudo chmod -R 777 pub var app/etc setup generated
sudo chmod -R 777 pub/ var/ generated/
sudo chmod -R 777 pub/* var/*
sudo chmod -R 777 app/etc/env.php