Reputation: 91
To give first some history to this problem; I'm setting up a django site on digitalocean first copied using root and the django folder had as the owner root and I've since worked on fixing this and now the site it up and running but one image still has the 403 forbidden error.
I'm looking for a command that can change the rights of this file.
-rwxr----- 1 sammy sammy 566719 Jul 1 14:52 developer.jpg
Upvotes: 0
Views: 1071
Reputation: 5397
Your NGINX user is likely using the www-data
or a different user, to verify the user being used by NGINX in a shell execute:
grep user /etc/nginx/nginx.conf
Then to change the file permissions:
chown www-data:www-data developer.jpg
Looking at your file permissions they also needed adjusted - see this answer for recommended perms.
(may require sudo
, replace www-data
with your NGINX user)
Upvotes: 1
Reputation: 2597
chmod -R 777 folder_name
chmod -R 777 file.name //when You are in directory where this file exist
or
chmod -R 777 file_path/file.name
Upvotes: 0