Reverse DNS, folder permissions?

Hello all :)

I've run my own site for close to a decade on shared hosting, but I'm new to VPS's and don't quite understand some of the stuff I've got to do. I've been trying to set up a LEMP and have been peicing together bits and bobs from the various Linode Library tutorials - one part is following the http://library.linode.com/hosting-website guide and I've hit a stumbling block that I can't work out:

The reverse DNS:

1) I don't know what it's for, what it does, why I need it

2) It seems to set the reverse DNS for one domain on my entire Linode? What do I do if I'm hosting two different domains on my Linode? Will sub-domains also need a reverse DNS?

The other part I'm struggling with is getting the right permissions/owners for my site. I've followed http://library.linode.com/lemp-guides/u … 10-oneiric">http://library.linode.com/lemp-guides/ubuntu-11.10-oneiric to try and get LEMP up and running (the most recent Ubuntu guide, though I am actually using 12.04LTS…) - and while it appears to work, I can't actually upload anything over SFTP because the server doesn't seem to have the right permissions? If you take a look at http://adaptive-images.com you'll see it's returning a 403 error too.

It'd be great if you could point me in a direction for some answers, thanks!

-Matt

6 Replies

Reverse DNS is mainly useful for servers that send email, if a receiving mail server doesn't see a reverse DNS entry for the IP that's sending the email that matches the name the mail server claims it has then it'll most likely regard it as spam.

You only have one reverse DNS entry which should be the hostname of your Linode, run hostname -f on your linode to find your FQDN.

The 403 error could be either

1) Nginx can't access the directory/files or

2) There's no index file for the domain and Nginx can't supply a list of files for the directory.

It depends on what your trying to achieve but in general you'll want the www-data user to have read access to your files which you can achieve by making all the directories 0755 and all the fils 0644, running chmod -R u+wrX,go+rX /path/to/your/webfiles will do that.

The files should be owned by whoever you're uploading as which you can set by running chown -R youruser /path/to/your/web/files

If that doesn't work, details of your Nginx config and what software you're running would be helpful.

Brilliant, i can now upload files and see the website! Thanks very much :)

I'm not using my Linode for email, so I'm assuming I can just ignore the reverse DNS. I did try what you said but it didn't work…

hostname -f gives me "mrserver.example.com" which only sounds half right. Putting that into the Linode Manager gave a "No match was found for 'mrserver.example.com'. Reverse DNS must have a matching forward entry that points to one of your IPs."

Unfortunately I don't understand DNS terms well enough to know what that error means (beyond there's got to be a forward 'thing' matching the reverse 'thing').

You need an A record pointing to your linode's IP for whatever your FQDN is I assume you substituted mrserver.example.com for what your FQDN really is. If you have any scripts that send out emails then it's a good idea to setup rDNS

Thanks :) Hmm, nope - that was literally it.

I've run through the first tutorial again and come across this in the FQDN part:

"…edit your /etc/hosts file to resemble the following example, replacing plato with your chosen hostname, example.com with your system's domain name…".

I replaced plato with mrserver - but what is my systems domain name? I don't have a domain name specifically for my system, and the tutorial seems to say it can be anything (i.e., unrelated to the domains I want to host)? Am I supposed to just make a nonsense Domain Zone in the DNS Manager as well and use that?

Thanks again!

It needs to be a real registered domain. In my case I use something.rwky.net the something tends to be a greek god because I'm a nerd. So just pick a domain you own (perhaps one your email is attached to) and create a subdomain for it and use that.

If you really can't think of anything then set it to the default Linode one which you can get from running host yourlinodeip

Great, thanks for all the help :)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct