Monday, July 17, 2017

permissions - How do I make a directory writable for the webserver?



Just got SQLite up and running on a new linode - but I couldn't make it work til I read some info that says the server must have write permissions for both the directory and the file -- okay fine.



So I made the directory 0777 permissions -- which is probably bad. How do I go about doing this properly?


Answer



Basically, give ownership of that folder to the to the user the webserver is running as. (usually "nobody"). chown is the command to do that. Then, only the first trio of permissions is useful. So 700 permissions would alow the webuser to access and write to the directory, and no one else to even read it.



--Christopher karel



No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...