Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Old 04-10-2005, 03:54 PM Block a folder!
ashly138's Avatar
Novice Talker

Posts: 9
Trades: 0
How can i block a folder so that only i can get info it.
ashly138 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-10-2005, 07:42 PM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
We'll need more than that to go on - we can't read your mind

Is it a folder on a web server or your local machine? Is it running Linux or Windows? What do you mean by 'get info on it'?

Under Linux you can use chmod to change the file permission for the directory itself. If you set the permissions to zero for everyone but the owner (you) then no-one else can modify it, or even read it.

chmod 700 <insert directoryname here>

will do that for you

if you don't have shell access, you can use your FTP prog to set permissions.
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 04-11-2005, 11:04 AM
CasaPages's Avatar
SillyPhilly

Posts: 758
Location: between here an somewhere else
Trades: 0
Like Oberon said a little more information would help....If you are trying to block folders on the web there is many many ways to accomplish this....It could be as simple as placing a blank index.html file in the directory you want or as complex as settin permissions with .htaccess files....It can sometimes be done with your "hosts" control panel or with WYSIWYG editors like Frontpage and (I think) Dreamweaver.........
__________________
It Happens

Please login or register to view this content. Registration is FREE
CasaPages is offline
Reply With Quote
View Public Profile Visit CasaPages's homepage!
 
Old 04-11-2005, 04:40 PM
ashly138's Avatar
Novice Talker

Posts: 9
Trades: 0
It a windows server. and i want to block it for the out side world. So that only me can enter that folder.
ashly138 is offline
Reply With Quote
View Public Profile
 
Old 04-11-2005, 05:35 PM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
Just put it outside your web root?
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 04-11-2005, 07:09 PM
ashly138's Avatar
Novice Talker

Posts: 9
Trades: 0
how? bicous than link dont work.
ashly138 is offline
Reply With Quote
View Public Profile
 
Old 04-11-2005, 07:28 PM
Phaedrus's Avatar
Ultra Talker

Posts: 271
Location: CA
Trades: 0
Like CasaPages said, it can probably be done from your hosting control panel. If you have cPanel, then it definitely can be done from there.

(Digression: Oberon, I tried to run the php code in your signature but didn't get anything meaningful. What's it supposed to say?)
__________________

Please login or register to view this content. Registration is FREE
Phaedrus is offline
Reply With Quote
View Public Profile
 
Old 04-11-2005, 08:02 PM
ashly138's Avatar
Novice Talker

Posts: 9
Trades: 0
but im using windows so how do i use it than.
ashly138 is offline
Reply With Quote
View Public Profile
 
Old 04-13-2005, 10:36 AM
CasaPages's Avatar
SillyPhilly

Posts: 758
Location: between here an somewhere else
Trades: 0
Ok are you talking about a website folder....or a folder on your local machine?
__________________
It Happens

Please login or register to view this content. Registration is FREE
CasaPages is offline
Reply With Quote
View Public Profile Visit CasaPages's homepage!
 
Old 04-13-2005, 11:08 AM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
If you need to protect files that aren't script files, then you will need to contact your host and see if they will set up a user account for you and then set permissions on that folder so only you and admins can access it, and not anonymous users.
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 04-13-2005, 11:23 AM
CasaPages's Avatar
SillyPhilly

Posts: 758
Location: between here an somewhere else
Trades: 0
Not always Minaki, but yes contacting your host will probably help....then again if you are trying to protect a folder on your local machine that is a completely different story.........
__________________
It Happens

Please login or register to view this content. Registration is FREE
CasaPages is offline
Reply With Quote
View Public Profile Visit CasaPages's homepage!
 
Old 04-13-2005, 04:04 PM
ashly138's Avatar
Novice Talker

Posts: 9
Trades: 0
It a folder on my own server that why its in windows.
ashly138 is offline
Reply With Quote
View Public Profile
 
Old 04-13-2005, 07:38 PM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
OK - you mean it's a folder on your own server, but you want to be able to access it from the web, but just you and no-one else right?

If this were an apache web server I'd go down the .htaccess route. Does anyone know of a windows server based equivalent?
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 04-13-2005, 08:21 PM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
You could do it with an ISAPI filter I guess but that would still envolve messing on the server side and be more complicated than setting up permissions!

In ASP.NET you can prevent access using the WEB.CONFIG file but I'm not sure if this can protect an entire folder...
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 04-13-2005, 08:30 PM
Christopher's Avatar
Iced Cap

Latest Blog Post:
Cross-domain AJAX with JSONP
Posts: 3,110
Location: Toronto, Ontario
Trades: 0
In your IIS manager, right click on the directory you want to protect (should be under "Default Web Site" somewhere). Go to the Directory Security tab. Click "Edit" under "Anonymous access and authentication control". From there, you can disable anonymous access and set a password requirement.

It's not as neat as an Apache deny rule, but that's the only way I know of. There probably is a way, but IIS isn't exactly my favourite server.
__________________

Please login or register to view this content. Registration is FREE
- Latest Articles:
Please login or register to view this content. Registration is FREE
,
Please login or register to view this content. Registration is FREE

--
Please login or register to view this content. Registration is FREE

Christopher is offline
Reply With Quote
View Public Profile
 
Old 04-14-2005, 09:27 AM
ashly138's Avatar
Novice Talker

Posts: 9
Trades: 0
I dont use IIS i use

Apace v2
PHP 5
mysql 4.1 newst
phpmyadmin newst.

I nied same sort a control panel like cpanel or so to block it?
ashly138 is offline
Reply With Quote
View Public Profile
 
Old 04-14-2005, 09:48 AM
CasaPages's Avatar
SillyPhilly

Posts: 758
Location: between here an somewhere else
Trades: 0
Nope you can use .htaccess files

have a look at these links

.htaccess Tutorial
Part 3 is on password protection

Apache Tutorial: .htaccess files

This is very technical

Javascriptkit.com Comprehensive guid to .htaccess

A rather simple/basic .htaccess tutorial

Thos should get you started
__________________
It Happens

Please login or register to view this content. Registration is FREE
CasaPages is offline
Reply With Quote
View Public Profile Visit CasaPages's homepage!
 
Old 04-14-2005, 11:29 AM
Christopher's Avatar
Iced Cap

Latest Blog Post:
Cross-domain AJAX with JSONP
Posts: 3,110
Location: Toronto, Ontario
Trades: 0
For Apache, I use this htaccess to block everyone out:
Code:
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Since most of my stuff is meant for me alone, I put this in the my root web directory and whatever I want public I just "override" the settings with some more htaccess:
Code:
Order Allow,Deny
Allow from all
__________________

Please login or register to view this content. Registration is FREE
- Latest Articles:
Please login or register to view this content. Registration is FREE
,
Please login or register to view this content. Registration is FREE

--
Please login or register to view this content. Registration is FREE

Christopher is offline
Reply With Quote
View Public Profile
 
Old 04-14-2005, 12:35 PM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
If you want access to it from a web terminal won't you need to set up a .htpasswd file?
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 04-14-2005, 01:40 PM
Christopher's Avatar
Iced Cap

Latest Blog Post:
Cross-domain AJAX with JSONP
Posts: 3,110
Location: Toronto, Ontario
Trades: 0
If you want to access it away from localhost, then you would need to use a different method (like HTTP auth, as you suggested). I got the impression he simply wanted to protect his localhost files from the outside, though.
__________________

Please login or register to view this content. Registration is FREE
- Latest Articles:
Please login or register to view this content. Registration is FREE
,
Please login or register to view this content. Registration is FREE

--
Please login or register to view this content. Registration is FREE

Christopher is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Block a folder!

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 not edit your posts

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.90116 seconds with 12 queries