fix: nginx permissions
This commit is contained in:
parent
e72909cb76
commit
5b9a114085
4
sites.py
4
sites.py
@ -228,6 +228,10 @@ def write_nginx_conf(site):
|
|||||||
with open(f'/etc/nginx/sites-enabled/{id}.conf', 'w') as file:
|
with open(f'/etc/nginx/sites-enabled/{id}.conf', 'w') as file:
|
||||||
file.write(conf)
|
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
|
# Restart nginx
|
||||||
os.system('systemctl restart nginx')
|
os.system('systemctl restart nginx')
|
||||||
return True
|
return True
|
Loading…
Reference in New Issue
Block a user