The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Password Protect and playing mp3 files

Discussion in 'General Discussion' started by jryce, Apr 8, 2010.

  1. jryce

    jryce Registered

    Joined:
    Apr 8, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hello all. I've glanced through the forum here and only found one post close to my problem I am having. But no solution to it. So I will ask my questions here. I have not used CPanel to often while keeping my site going. Once I got sohoadmin going I just pretty much do everything through that.

    Here is my situation and problem.

    My site is a place for me to post music that I write and create myself. Things are great and I have no problem uploading my songs in mp3 format and then creating pages with media players on them to play the songs.

    I also created a webpage that has links for some of these songs to be downloaded only by people who are members of my site. I create a member and password (with sohoadmin), assign them the downloads page, and when they log in they go directly there and can download. I thought things were fine that way. That is until I realized yesterday that the system folder "media" (I assume system because I didn't create it) is wide open. If someone goes right to that folder by typing it they get no access, but, if they type it followed by "/song_name.mp3" there is the song for them to get to.

    So I read up about using CPanel to do the password protect of a folder and I password protected the media folder. So then when I tried to access the media folder by typing (in the URL) followed by the song name, I got prompted for a password ... Perfect, I thought.

    Then I went to my main page and clicked the Members Login box and logged in as one of my members. It took me to the download page. If I just clicked on the song title, it would try and play it, but ask me for a password (the one created by CPanel ... I only created one test user for the folder password). But if I right click and select "save target as" I was able to save the file so I am very happy with that. That works fine for me as the people are supposed to download the song, not really listen to it there.

    BUT, when I went to a normal page on my site which has a media player with a song on it so people from anywhere can click on the player and listen, it promted me for a password. I don't want people to have to enter a password when they come to my site and want to listen to a song demo. That would be a pain.

    As far as I can tell, all my song files are in this media folder. I use sohoadmin to upload the files and it doesn't give me an option as to where to put them when I upload.

    So any ideas how I can protect my completed songs from general access (therefore a password), but still be able to have pages playing the demo songs without passwords?

    This all started because I was trying to setup the shopping cart to enable a download of one of the completed songs after a purchase.

    Sorry for the long post, just trying to make sure folks understand what I am trying to do here.

    Thank you for any help with this, James.
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    When you password protect a directory feature in cPanel, everything in that directory becomes password protected. To have files that are not password protected, put them in a separate directory.

    However, the issue here seems to be that sohoadmin (not part of cPanel/WHM, though it does integrate with our software) is limiting you with regards to where to upload your mp3s. I recommend contacting either your web hosting company or the makers of that software (who can be found at SohoLaunch.com) for further guidance with how to use that software.
     
  3. jryce

    jryce Registered

    Joined:
    Apr 8, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Thank you very much for the quick reply. I don't know a whole lot about website management, but manage to fumble through the sohoadmin to get what I want done.

    Do you think I could use CPanel and move the files around to different folders and then password protect only those folders? I guess it wouldn't hurt to try and create a new folder and then move things around. Then see if I can still point my media players to those folders. I don't need all my mp3 protected, just some of them.

    Thanks for the information.

    James.
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I'm not sure how that would affect sohoadmin as I am not intimately familiar with how their software works. However, you can use File Manager within cPanel to move files around and then go back to the Password Protect Directories screen to control which folder(s) to have password protected.
     
  5. jryce

    jryce Registered

    Joined:
    Apr 8, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Thanks again. I'm going to try that later tonight and see how it works. I'm not sure how things will look in sohoadmin as well, but no harm in trying as long as I don't move to many files around.

    If I have good success, I'll update the thread incase anyone else is doing something like this.

    Thank you, James.
     
  6. jryce

    jryce Registered

    Joined:
    Apr 8, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Just a quick update David. I loaded CPanel and create a new folder at the same level as the media folder (so not below media). I moved an mp3 file out of media and in to the new folder.

    I then went in to sohoadmin and sure enough, when I tried to insert a media player and use that moved song, it wasn't in the list provided to me by sohoadmin. So I just selected a different mp3, then went in to edit the html and retyped the path to show the new folder/mp3 file and it worked like a charm. So I think I am on my way to getting this setup better.

    Once I get all my demo songs out and redirected, I'll leave my full and finished songs in the media folder and password protect that folder. Couple extra steps, but it isn't that bad.

    Thanks, James.
     
Loading...

Share This Page