Password Protect Directories: Media Files

dgriff80

Registered
Dec 27, 2007
2
0
51
Hello!!! n00b here...

So I password-protected a directory, to which i have a podcast mp3 inside. This mp3 will not open now in any browser on my computer or my phone... even when i type in a valid username and password. In my browsers, quicktime shows the logo with a grayed-out Question-Mark. Now, as soon as (through cPanel) i remove the password protection, i can access the exact same file no problem!!!!! Any ideas?

My troubleshooting so-far.
1) replaced mp3
2) removed Password Protection, OK. Re-applied: Error playing file
3) placed image file in directory, OK
4) placed html file in directory, OK

... but for some reason I cannot get the mp3 file to play without removing the password protection! Help!
 

dgriff80

Registered
Dec 27, 2007
2
0
51
Updated Troubleshooting... still need help!

Updated Troubleshooting... still need help!

5) I was able to download the mp3 file successfully onto the desktop, but could not play it with an embedded browser player... anyone have any ideas?
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Updated Troubleshooting... still need help!

5) I was able to download the mp3 file successfully onto the desktop, but could not play it with an embedded browser player... anyone have any ideas?
Here's the issue: your MP3 player is not sending those credentials to the server and as such cannot download the MP3. Various MP3 players handle this differently, in your case it is just "graying out."

The MP3 player embedded in your web browser via a plug-in (or some other means) is an external program. It does not have access to the user credentials you have sent via your browser. Additionally, servers will not be "Okay, this IP entered a valid user/pass, all connections from this IP should be considered authenticated." All of this is due to various security concerns.

You may wish to find some MP3 player (flash-based, plugin-based or some other type of player) that explicitly states it can use HTTP authentication credentials. This way you can have a user login to a password protected page, which then passes those credentials to whatever script is needed to execute the player in a manner that it also has the proper credentials.