fixed permission issue by running it as user www-data
This commit is contained in:
parent
dcbc4d9408
commit
e3c0a81f22
|
@ -17,7 +17,7 @@ log_error() {
|
|||
|
||||
# Run the PHP command
|
||||
log_message "Running PHP command..."
|
||||
php /app/code/artisan lychee:sync /app/code/public/uploads/import/ >> "$LOG_FILE" 2>&1
|
||||
sudo -E -u www-data php /app/code/artisan lychee:sync /app/code/public/uploads/import/ >> "$LOG_FILE" 2>&1
|
||||
php_exit_code=$?
|
||||
|
||||
# Check if the PHP command succeeded
|
||||
|
@ -34,3 +34,6 @@ if [ $php_exit_code -eq 0 ]; then
|
|||
else
|
||||
log_error "Error executing PHP command. Exit code: $php_exit_code"
|
||||
fi
|
||||
|
||||
# Exit the script
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue
Block a user