Score:0

Nginx can't read files when symlinking folder in /home/user to /var/www

cn flag

I want to be able to edit my sites files without using sudo, so I symlinked /home/USER/project to /var/www/project with ln -sTf /home/USER/PROJECT /var/www/PROJECT However, Nginx displays 403 forbidden when visiting the site. /var/log/nginx/error.log is empty.

I tried giving execute permissions to /home, /home/USER, and even just trying 777 for the project folder, but it still gives the same error.

Is there something that I'm missing? Nginx seems setup to follow symlinks by default, so I'm not sure what's wrong.

Salar avatar
vi flag
What is your distribution? if you are redhat based it might be a problem with "selinux" if all of permissions are correct disable selinux and check if problem exists. to disable selinux temporary until next reboot run " sudo setenforce permissive "
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.