2

I am able to create folders in my root directory using cPanel. When I do so I would like to be able to access them from the public_html so that they are available on my website. However, I don't see any way of doing so.

Are folders at the root level actually accessible from public_html folder? If I want to make them accessible, then how to do that?

enter image description here

  • Can you clarify what you are trying to do here? It is not very clear. Maybe provide an example? – John Conde Feb 14 '16 at 16:22
  • In the filemanager of c panel we saw a lots of folder, one of them is public_html where we put our file to run publicly to cloud. but if i want to browse the other folder from my cloud folder[public_html] then how can i do? – Murad Hasan Feb 14 '16 at 16:25
  • 1
    "browse the other folder from my cloud" - still not sure what you mean? Like you said yourself, only the contents of the public_html folder is public (ie. browsable over HTTP). Everything else, outside of the public_html folder, is not accessible over HTTP. Directories outside of the public_html folder are only available to your server-side code. – MrWhite Feb 14 '16 at 16:47
  • so from public_html i can't browse any of them? – Murad Hasan Feb 14 '16 at 16:50
  • Well, like I say, I'm not sure exactly what you mean, but the answer would seem to be "no". However, if you provide an example, we can perhaps clarify what you mean. A statement like "access it from my public_html folder" doesn't really make sense. It's not clear how you are accessing your files, HTTP, FTP, etc.? – MrWhite Feb 14 '16 at 17:11
3

If you want something to be accessible publicly on the web, you should put it in the public_html folder. You can create folders within public_html as well.

There is no functionality in cPanel for publicly browsing files outside of public_html. That is a security feature. Many items in the root folder should not be public. There are passwords stored in .htpasswds. Your server logs might have sensitive details about your users. Anything that you want to be visible on your site should go in the place that is designated for that.

  • 1
    If permissions allow, the OP can possibly create a symlink to the desired directory. I have done this in the past without issues. Of course, permissions can be set for the target directory to make this happen. Still, your advice to create the directory in the web root is best, or course. – closetnoc Feb 15 '16 at 5:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.