But I'm also new to linux hosting, and cpanel.
I have two questions, first is simplest.
When I create a folder called mydomain.com/subdirectory
And put that address in the browser, I get a permission denied. How do I make a folder browsable? Other web hosts I've had defaults to browsable.
I've also tried password protecting a directory through cpanel, but the directions seem to be for an older version of cpanel, but that question is for another day.
Thanks to anyone who can help - Sylvia
Hi @compsci, thanks for joining us and posting on the Community.
When creating a new folder, you would not need to change permissions on it to access it. It is readable by default. However, you might not have a valid index file in that folder, so nothing is displayed when you try to access it. See:
You can try to visit yourdomain.com/directory/filename.html. You should also keep in mind that Linux is case-senstive for folder and file names. (yourdomain.com/directory is different from yourdomain.com/DIRECTORY)
Regarding Password protecting directories, the steps in this article should work for you:
If it doesn't, feel free to follow up with some more information, including the steps you were taking and the errors that you were seeing.
Thanks for the links. I will read them and I appreciate them.
Re making a directory browseable:
No, I don't have an index file in the subdirectories, I want users to browse the contents so I don't have to create a link for each file in there. For example, on another service I use it would look like this, when going to myplace.org/musicpdfs
Sunday, February 15, 2015 12:50 PM 74353 AshokanLyrics.pdf
Sunday, February 15, 2015 12:50 PM 25915 C01_Purcell_QueenMaryFuneralMarch.pdf
Sunday, February 15, 2015 12:50 PM 49425 C02_Bach_6Menuet.pdf
Sunday, February 15, 2015 12:50 PM 37935 C03a_Bach_MusetteinD_ScoreRWalshe.pdf
Sunday, February 15, 2015 12:50 PM 117719 C03b_Bach_MusetteinC_ScoreRWalshe.pdf
Sunday, February 15, 2015 12:50 PM 33772 C04_charpentier_GigueAngloisSATB.pdf
Sunday, February 15, 2015 12:50 PM 28209 C05_charpentier_Giguefrancais-SATB.pdf
Sunday, February 15, 2015 12:50 PM 201684 C06_Charpentier_Menuet_1688_SATB.pdf
Sunday, February 15, 2015 12:50 PM 86977 C07_Corelli_SonataQuattro_AATB.pdf
Sunday, February 15, 2015 12:50 PM 55405 C08a-Mortaro-La Bellotta in F-3Page-ATBB.pdf
Sunday, February 15, 2015 12:50 PM 46067 C08b_Mortaro-LaSaronna_InG-score.pdf
Sunday, February 15, 2015 12:50 PM 103486 C08c_Mortaro-LaMontina3Pg.pdf
Sunday, February 15, 2015 12:50 PM 80444 C08c_Mortaro-LaMontina4Pg.pdf
Sunday, February 15, 2015 12:50 PM 12077 C08c_Mortaro-LaMontina4SoundFile.mid
Hi @compsci, thanks for following up.
I see what you are referring to now. That is something you can enable using a .htaccess on a cPanel/Linux plan.
You can add or edit an existing .htaccess file to that directory, and include the following:
An .htaccess file is a plain text file. If there is not one in that particular directory, you can create a plain text file with the code in it, name it ".htaccess", and then place in in that folder. You can also add it too the root directory of your hosting plan to affect every folder.
Some more information on this can be found here:
@compsci, I am surprised that other hosts make directories browsable by default. I know that Windows IIS does not. It is a serious security vulnerability to make directories browsable. Hosts should not make it the default!