Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED Proper file structure for new account?

Discussion in 'General Discussion' started by Pippab, Apr 25, 2018.

  1. Pippab

    Pippab Registered

    Joined:
    Apr 25, 2018
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Website Owner
    I opened an account a few days ago in order to move/upload my basic website which until now has been sitting on the server of my ISP and been working fine.
    Having opened up the file manager & seen all the directories automatically generated, I was a little confused as to which of them I should choose in which to upload my site (which itself has various directories).

    It did not help that initially that there were 4 FTP accounts. I tried to configure the "home" one having very recently downloaded FileZilla (which I am also new to!). I had been using a limited edition of WS_FTP of which I had a very basic knowledge.
    The FTP configuration for FileZilla failed and I have tried various changes (made sure FileZilla allowed through firewall & correct port (21) specified). I still cannot upload files from my desktop via FileZilla to File Manager but I find I can upload the files from the File Manager side so this is my workaround for now. I tested this using a couple of the files in imported them into the "home" directory.

    I then decided to create a sub-domain purely for my website so transferred the uploaded files from the "home" domain directory to the sub-domain directory.

    I then tested the visibility/accessibility of the home page from the web. Visitors can see the index page of my site which is an html file but any of the links within it which direct the visitor to one of the many html files within the sub-directories on the sub-domain cannot be accessed.

    The 403 error message is as follows:-

    "You don't have permission to access /wc_idx/sur.htm on this server.
    Server unable to read htaccess file, denying access to be safe

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

    In regards to permissions. With my limited understanding, I wish to have full access but I wish visitors to only be able to read the pages/data on the website. To this end I have set permissions for my home domain directory and sub-domain directory & files as 0744. This may well be wrong but my understanding of the subject is limited so suggestions most welcome.

    In addition, whilst creating my sub-domain & moving files about, I may have inadvertently deleted some files which were automatically generated when the account was opened and for which I failed to understand the significance of.

    The attached image has a list of all the directories in the account.

    If anyone is still reading & not given up on this hopeless newbie, I would appreciate some help with the permissions bit & also if I have deleted some system files/data, help restoring or recreating them (yes the trash bin is now empty!)
     

    Attached Files:

  2. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,517
    Likes Received:
    251
    Trophy Points:
    193
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Pippab

    By default the document root of your site (where your site data goes) is /home/$user/public_html/ this is where you should store your site data. Based on the image you provided it looks like you put the folder containing the site data directly into home. I would move the data inside the folder into public_html.

    As for the subdomains when you go to cPanel>>Domains>>Subdomains the directory listed under Document root for the domain should be where the site related data is added.


    In general, all directories will have permissions of 755 and files of 644 and this should work for you without making modifications in most cases

    Are you aware of which files specifically you removed? You might want to try and start over - recreate the account then re-add your data if you're unsure.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Pippab likes this.
  3. Pippab

    Pippab Registered

    Joined:
    Apr 25, 2018
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Website Owner
    Thanks for the info. I altered the permissions as suggested & moved the site data into public.html & all appears to be resolved :-D.
     
  4. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,517
    Likes Received:
    251
    Trophy Points:
    193
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi,

    I'm glad to hear that the issue is resolved, you're most welcome, we're happy to have been able to help!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice