Comment to 'Cant upload image into my UNA'
  • Check if the hostname is set:

    Run the following command in SSH to display the current hostname:

    hostname
    

    It should match your website’s domain name.

    If it’s not set correctly, add or update it like this:

    1. Edit the /etc/hostname file:
    sudo vim /etc/hostname
    

    Add your desired hostname (e.g. your.domain.com) on a single line.

    1. Edit the /etc/hosts file:
    sudo vim /etc/hosts
    

    Make sure it includes:

    127.0.0.1   localhost
    127.0.1.1   your.domain.com
    
    1. Apply the changes:
    sudo hostname your.domain.com
    

    And either restart the systemd-hostnamed service or reboot the server:

    sudo systemctl restart systemd-hostnamed
    

    or

    sudo reboot
    

    Setup una permissions:

    #!/bin/bash
    # Move into the 'una' directory
    cd una
    
    # Change the owner of all files and folders to 'www-data' (the default web server user)
    sudo chown -R www-data:www-data .
    
    # Set permissions for all directories to 755:
    # 7 = read (4) + write (2) + execute (1) for the owner
    # 5 = read (4) + execute (1) for the group
    # 5 = read (4) + execute (1) for others
    sudo find ./ -type d -exec chmod 755 {} \;
    
    # Set permissions for all files to 644:
    # 6 = read (4) + write (2) for the owner
    # 4 = read (4) for the group
    # 4 = read (4) for others
    sudo find ./ -type f -exec chmod 644 {} \;
    
    # Give execute permission to ffmpeg.exe (because it’s an executable file)
    sudo chmod +x ./plugins/ffmpeg/ffmpeg.exe
    
    # Show confirmation message
    echo "Permissions successfully set."
    

    Check the latest 50 log entries in your app logs:

    cd una
    tail -n 50 ./logs/*.log
    

    And for NGINX logs:

    tail -n 50 /var/log/nginx/access.log
    tail -n 50 /var/log/nginx/error.log
    

    List cronjobs:

    sudo crontab -u www-data -l 
    

    To edit cron jobs for the www-data user, run:

    sudo crontab -u www-data -e
    

    clear all cache

    Check if you have all required PHP extensions installed.

    If you need to reinstall PHP, you can check this guide:

    happy coding!