diff --git a/sites.py b/sites.py index 547ab35..ab9003d 100644 --- a/sites.py +++ b/sites.py @@ -228,6 +228,10 @@ def write_nginx_conf(site): with open(f'/etc/nginx/sites-enabled/{id}.conf', 'w') as file: file.write(conf) + # Give read permissions to nginx for the /root/site-manager/uploads directory + os.system(f'chown -R www-data:www-data {location}') + os.system(f'chmod -R 755 {location}') + # Restart nginx os.system('systemctl restart nginx') return True \ No newline at end of file