icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » Shared Hosting » Password protect a file

Shared Hosting Questions about your shared hosting account.

Reply
 
LinkBack Thread Tools Search this Thread
Old January 18th, 2007, 4:16 PM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in Jan 2007
18 posts
Gave thanks: 6
Thanked 0 times
Password protect a file

How do I password protect a file that I am allowing to be downloaded?
cajunboy2208 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 18th, 2007, 5:15 PM   #2 (permalink)
pineapples are sharp
Super #1
 
Brandonnn's Avatar
 
Joined in Dec 2005
5,773 posts
Gave thanks: 147
Thanked 151 times
Quote:
Originally Posted by cajunboy2208 View Post
How do I password protect a file that I am allowing to be downloaded?
You could password protect the directory that it resides in through Cpanel.... but there are more elaborate methods using Crypt/HMAC, SHA1, MD5, PHP, SOAP/REST and signed requests... that provide advanced methods of file protection/distribution
__________________
poof
Brandonnn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
This user thanks Brandonnn for this great post!
cajunboy2208 (January 18th, 2007)
Old January 18th, 2007, 5:45 PM   #3 (permalink)
Registered User
Fresh Surpasser
 
Joined in Jan 2007
18 posts
Gave thanks: 6
Thanked 0 times
I have no clue how to crypt or any of that stuff.

Well I guess I will just have to make a lot of folders or something. That would work out.
Where is the password protect in the cpanel?
cajunboy2208 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 18th, 2007, 5:50 PM   #4 (permalink)
Surpass Fan
On a golden path...
 
Joined in Mar 2006
Hosted on SH100
455 posts
Gave thanks: 73
Thanked 17 times
If you want to password protect just one file for a friend to download or something you can just encrypt it and upload it using some free encryption program like AxCrypt. Then tell your friend the exact location of the file and the password by telephone. The odds of someone finding the download with no link to it on the internet is extremely low. And even if they do it is encrypted. Then just delete it after he got it.

If you are going to be allowing access to certain files and changing them and users that allowed to use them then that is not practical and using htaccess files to password protect an entire folder is better.
Sentinel is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
This user thanks Sentinel for this great post!
cajunboy2208 (January 18th, 2007)
Old January 18th, 2007, 6:15 PM   #5 (permalink)
Registered User
Fresh Surpasser
 
Joined in Jan 2007
18 posts
Gave thanks: 6
Thanked 0 times
Quote:
Originally Posted by Sentinel View Post
If you are going to be allowing access to certain files and changing them and users that allowed to use them then that is not practical and using htaccess files to password protect an entire folder is better.
This is the way I am going. I will have about 30 people downloading it, but I want it to remain semi-private, because some people do know the domain and where some files are located, and plus it isn't that hard to search. So a password will keep those who I don't want to access it out, unless someone leeches it. Anyways it will be up for 24hrs, I just need to put a password on the folder.
Where is the htaccess?

Ok I found how to do that... but what does this mean?
Protected Resource Name (will display in browser's password mask):

Also, if I set up several users with their own passwords, will I be able to see how many times that user has accessed the download?

Last edited by cajunboy2208; January 18th, 2007 at 6:19 PM..
cajunboy2208 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 18th, 2007, 6:31 PM   #6 (permalink)
Surpass Fan
Comfy Contributor
 
psfrog's Avatar
 
Joined in Jun 2004
Lives in Sweden
Hosted on Muy and Dedicated
219 posts
Gave thanks: 7
Thanked 22 times
If you wish to password protect a single file like you do for folders, it's possible to add this in a .htaccess file in the folder were the file is located:
Code:
<Files thefile.php>

AuthUserFile "/home/accountname/ .htpasswds/whatever/passwd"
AuthGroupFile /dev/null
AuthName "Log in to get the file"
AuthType Basic

require valid-user

</Files>
Then the username & password you wish to use, needs to be saved in a file named passwd in folders named the same as in the path you wrote in the .htaccess file. Example; If you wrote like in the above example .htpasswds/whatever (then create thoose folders & file one step above the public_html folder - in the "home" directory).

Username & Password is saved like: name:PaSsWOrd.
The password should be encrypted, never use the real name like PaSsWOrd - instead go here to get it encrypted:
http://www.kxs.net/support/htaccess_pw.html

Example: Username: name Password: PaSsWOrd will become: name:ZVQGPAFmTwvKU
__________________
:: Have a great day! /Erik at http://www.psychofrog.se and http://www.manufrog.com ::
Server: Muy and Dedicated
psfrog is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
These users thank psfrog for this great post!
cajunboy2208 (January 18th, 2007), H (January 22nd, 2007)
Old January 18th, 2007, 6:36 PM   #7 (permalink)
Surpass Fan
Comfy Contributor
 
psfrog's Avatar
 
Joined in Jun 2004
Lives in Sweden
Hosted on Muy and Dedicated
219 posts
Gave thanks: 7
Thanked 22 times
Quote:
Protected Resource Name (will display in browser's password mask):
That is what will be displayed in the "pop-up" window where the visitor fill out his/hers log-in details to get logged in to the directory or file.
__________________
:: Have a great day! /Erik at http://www.psychofrog.se and http://www.manufrog.com ::
Server: Muy and Dedicated
psfrog is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
This user thanks psfrog for this great post!
cajunboy2208 (January 19th, 2007)
Old January 18th, 2007, 7:17 PM   #8 (permalink)
Registered User
Fresh Surpasser
 
Joined in Jan 2007
18 posts
Gave thanks: 6
Thanked 0 times
What if I wanted multiple names and passwords?
cajunboy2208 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 19th, 2007, 2:36 AM   #9 (permalink)
Marketing Maven
Surpass Staff
 
Kayla's Avatar
 
Joined in May 2003
Lives in Orlando
24,749 posts
Gave thanks: 946
Thanked 806 times
Quote:
Originally Posted by Sentinel View Post
.. just encrypt it and upload it using some free encryption program like AxCrypt. Then tell your friend the exact location of the file and the password by telephone. The odds of someone finding the download with no link to it on the internet is extremely low. And even if they do it is encrypted. Then just delete it after he got it ..
You sound like you have some good experience in that.. whatcha been sending, hmmm?

__________________
Follow Surpass on Twitter and Facebook
Check out the Surpass Blog



Kayla is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On