0

Hello i am setting up a server nginx gives 403 Permission dinied. I found out that somehow the command

chown -R root:www-data /my_directory

only set the permissions of directories. When i use ls -lash i get this

4.0K -rw-r--r-- 1 root www-data 95 Jan 27 16:14 confirm_delete.js

any ideas how i set these permission (preferable for alldirectories at once)

1
  • What user are you running nginix as? And does the root in your nginx.conf file match with the directory you're referencing here?
    – Foosh
    Jan 27, 2015 at 16:32

1 Answer 1

0

You're looking for the chmod to change permissions, chown only changes owner/group on files and directories. You'll want to use sudo chmod -R a+rx /my_directory to add the read and execute flags to all files and directories under /my_directory.

1
  • Hmm yes permissions changed. however nginx still does not have permissions :( Jan 27, 2015 at 16:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .