Restoring the public_html files?

counting

Registered
Jan 14, 2007
3
0
151
Hi, the public html file was accidentally deleted from the cpanel, and I attempted to restore by the last known backup. I uploaded the backup, no results. I then moved the public_html file from the backup that was uploaded and am now getting a 403 error. Can anyone tell me what I am doing wrong and how to fix the problem?
 

counting

Registered
Jan 14, 2007
3
0
151
Make sure the owner is set to yourusername:nobody and permissions are 0750

HTH
Where do I do that at? Sorry for the dumb questions! But I do appreciate any help I can get!

This is the message I Am getting :"
Forbidden
You don't have permission to access /contact_us.shtml on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
 
Last edited:

night-fire

Well-Known Member
PartnerNOC
May 3, 2007
89
0
156
Hi, the public html file was accidentally deleted from the cpanel, and I attempted to restore by the last known backup. I uploaded the backup, no results. I then moved the public_html file from the backup that was uploaded and am now getting a 403 error. Can anyone tell me what I am doing wrong and how to fix the problem?
Hello,
Firstly I'd like to just let you know you have posted in the wrong section of this forum. However I reccomend changing the owner and group to its original owner:
What you will need:
SSH Access as root on the dedicated server/VPS:
The accounts username (the one that no longer has public_html)
All the backed up files ready to go.

Ok Now Heres some steps to follow (you may have already done some of these)
  1. Login to SSH and eitehr login as root or SU into root
  2. cd /home/CLIENTHOME (CLIENTHOME = Clients Username)
  3. Check if there is a public_html directory (dir, ls, ll either of this will show you)
  4. If there is type ls -asl to see if the folders are all owned by the respective account holder
  5. If there is any folders that are owned and group owned by root type: chown USERNAME FOLDER (Username = Clients Username) and then chgrp USERNAME FOLDER
  6. To make sure all files are owned by the User type the following as well chown USERNAME FOLDER/* (Username = Clients Username) and then chgrp USERNAME FOLDER/*
  7. Try checking the site.
This should fix the issue. don't chmod stuff unless it needs to be! this can lead to security issues.
 

Infopro

Well-Known Member
May 20, 2003
17,090
516
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Where do I do that at? Sorry for the dumb questions! But I do appreciate any help I can get!

This is the message I Am getting :"
Forbidden
You don't have permission to access /contact_us.shtml on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

The easiest way IMHO, is to install this. http://www.configserver.com/cp/cse.html
You will need SSH access for that but the install is quite easy, chirpy gives you the exact commands to run there. Once you have it installed access it via WHM and you can check these files/directories quick and easy.

If the files inside your public_html are all setup ok, and its just a matter of changing ownership and perms on the public_html directory itself, using CSE will work fine.

You can get into trouble using CSE, but I think a lot less trouble than running commands on full directories if you're not sure how to do that.