Help needed. Ownership and permissions for static Website in VPS (VestaCP)?
#1
Although I'm quite experienced with moving WordPress sites from one server to another, yesterday was the first time that I moved an old antiquated static Website of mine from Siteground cPanel to my new VPS with VestaCP.  The WordPress sites' migration went super fast, but after I SFTP'd my static Website files to the root of the domain, it came up with a no permission 403 Error page.  

Apologies if the help that is asked is too basic.

With WordPress I learned to create ownership of root as a prerequisite for being able to install plugins in the WordPress Dashboard.  So when the static Website came up with no permission Error 403, that was the first thing I did, I chowned the root ownership.  But then I learned there was something like a Group as well.  So next fixed that too with chgrp.  Checked it with the "ls -l" command and ownership of both root-root was changed for all folders and files.  However, I still had problems.  Error was still a no permission 403 error.  One of the possibilities could be that my index file is an antiquated index.htm.  Could that be it?

Any suggestions?  Is there something else I missed?  

Summary of questions:
1. When one uploads the content of one's static Website to the root of one's domain, what should the permissions be and what are the steps and commands you usually follow with fixing those?  

2. Could index.htm be a problem and do I need to redo it as index.html?
#2
I'm using VestaCP.

VestCP website file are hosted under user admin and deployed under /home/admin/web/<website_name>/public_html by default. Changing the folder permission to admin user is enough.

If i'm moving my old website to VestCP, i would follow these steps:

1. Login into my VestaCP panel.
2. Add new domain for my old website. (New folder structure will be created under /home/admin/web/ for your new domain)
3. Login into my VPS using SSH.
4. Now manually copy files from my old server into my new server.
5. Now move my website files to correct folder location /home/admin/web/<website_name>/public_html
6. Change folder permission to admin user.
chown admin:admin /home/admin/web/<website_name>/public_html -R

Hope this would help.
Android Fan,Developer and Supporter.
My Websites
http://www.cybapps.com

Thanks to HostDare for VPS
#3
Thanks @cybersa. Now at least I know I did everything exactly right with chowning it - my steps had been the same as your steps. Only remaining possibility is the index.htm must have become deprecated. I'll have to rework it.

Another interesting issue that came up. Yesterday when I changed my name servers of the domain to my VPS, the name servers propagated within an hour. Like very fast. So I thought until I'd found a solution for the permissions thing that I would park the Website temporarily in a cpanel free hosting account of mine and see whether that would work: I changed the name servers to the cpanel host's name servers, deleted the domain in VestaCP, also deleted the folder under Webs. It's almost a day since I changed the domain name servers to the cpanel free hosting account, and the site is still showing VestaCP without content in it of course. Anyway, I'll have to find a different way - probably recreating the index file should do it. I'm determined to have that Website in my new VPS. One good thing with troubleshooting is one always learns a few things while one is working through all of the solutions.
#4
(2017-11-10, 3:33:02 am)deanhills Wrote: It's almost a day since I changed the domain name servers to the cpanel free hosting account, and the site is still showing VestaCP without content in it of course.

I don't know if you solved it by yourself or not but it is similar to my problem i had back with a VestaCP hosted website, in my case i setup SSL website and accidentally set the directory to Public_shtml instead of public_html and i was like stun when finding there was nothing but just a blank page showing my domain name and a powered by line it took about half an hour to find the problem was directory.
I don't know why i added my signature, have a better suggestion for my signature? PM me.
#5
(2017-11-11, 5:17:35 pm)TrK Wrote: I don't know if you solved it by yourself or not but it is similar to my problem i had back with a VestaCP hosted website, in my case i setup SSL website and accidentally set the directory to Public_shtml instead of public_html and i was like stun when finding there was nothing but just a blank page showing my domain name and a powered by line it took about half an hour to find the problem was directory.

I'm stunned myself.  Today when I checked - almost 3 days after I had removed the domain from VestaCP and added different name servers at the domain registrar as well as had deleted the directory of the domain in VestaCP - the domain still comes up with that VestaCP blank page. Just couldn't believe it.  Must be something with VestaCP DNS.  I'm traveling right now, but as soon as I'm in a secure environment again I'll rework the domain and take it back to VestaCP since VestaCP likes it so much.  My plan will be to reload the domain, change the name servers back to the ones with the VPS and then update the live VestaCP index.html with the content of the current index.htm.  See if that will do it.   I'll report back in a couple of weeks when I'm in a secure SSL environment again.
#6
(2017-11-11, 6:45:57 pm)deanhills Wrote: I'm stunned myself.  Today when I checked - almost 3 days after I had removed the domain from VestaCP and added different name servers at the domain registrar as well as had deleted the directory of the domain in VestaCP - the domain still comes up with that VestaCP blank page. Just couldn't believe it.  Must be something with VestaCP DNS.  I'm traveling right now, but as soon as I'm in a secure environment again I'll rework the domain and take it back to VestaCP since VestaCP likes it so much.  My plan will be to reload the domain, change the name servers back to the ones with the VPS and then update the live VestaCP index.html with the content of the current index.htm.  See if that will do it.   I'll report back in a couple of weeks when I'm in a secure SSL environment again.

Mostly DNS record update get reflected within 48hrs. Three days still not reflected is looking weird. 
Make sure following things:
1. cleared your DNS cache and Browser Cache.
2. DNS updated correctly in your dns registrar.

You can use this command to verify the NS record of domain name:
$dig <dominname> NS
Android Fan,Developer and Supporter.
My Websites
http://www.cybapps.com

Thanks to HostDare for VPS
#7
You're right @cybersa.  My bad.  The DNS must have resolved ages ago.  Yesterday when I checked the cpanel account files, I noticed I forgot to remove the VestaCP index page so there was a perfectly good explanation for the VestaCP to appear all of the time. When I removed the VestaCP index page however, the Website's index page got ignored, like the domain resolved to the file directory instead of the home page. Then next thing after I'd spent almost an hour puzzling over it, I was wondering whether it could be as simple as  my index page being written with capital I - "Index.htm" instead of a small "i".  The capital didn't bother Siteground when I had my domain there, but finally learned it did bother the cpanel of the free shared host I moved it to.  When I changed the home page to a small "i" as in "index.htm" the home page resolved perfectly. 

So tonight had a chance and went back to ground zero moving the domain and website from my shared host to my new VPS with VestaCP.  I changed the name servers of my domain to my new VPS name servers, then created an add on domain in VestaCP (i'd previously deleted it when it hadn't worked out).  Finally I uploaded my domain files to the root of my domain in my new VPS VestaCP.  The name servers propagated almost immediately.  The Website worked immediately.  No folder or file permission modification needed.  It turned out the reason for the problem from the beginning was that the home page was capitalized.  

So here are the lessons I learned from this brainstorm session:

1. When permissions error page 403 comes up it doesn't necessarily mean that it is a folder and file ownership or permissions problem.  It could be that the home/index page is not resolving correctly.  In my case it didn't resolve at all.

2. My home page didn't resolve because the Index.htm home page was capitalized.  Can't believe that something so small can completely  put one on the wrong path.




Users browsing this thread: 1 Guest(s)

Switch to mobile version

Sponsors: Ftpit - ZXPlay - GalaxyHostPlus - Verelox- HostUS - Host4Fun - Evolution-Host - NodeBlade - HostDare - VPSMost


BitCoin donations: 1DQxbstaTb5SWk6QC2gFeQUTFR64JX4cEo