Fedora Linux Support Community & Resources Center
  #1  
Old 14th May 2007, 09:37 PM
giles100 Offline
Registered User
 
Join Date: May 2007
Posts: 3
need help securing filepaths

Hi,

This is my first posting so I hope it’s in the right place. I’m finishing my first dynamic site, which I’m administrating, on Fedora Core 4. I’m learning as I go along - so please forgive if questions are a bit unclear.

I’m currently reviewing the security of my site after reading a article (lost the URL!!!!!) that recomended using relative file paths to hinder attacks ... I think it was saying you can stop an attack by the fact that you are concealing the root directory. (e.g. ../index.html) - is this true?

thing is, the root of my site is the “public_HTML” folder on my server .... and so if I know my URL I can access any subdirectories. The only way I can see to truly protect my image folders, include files etc is to place them in a higher directory - i.e. in an adjacent folder to public_HTML, so the root folder cannot be guessed.

- Does this make sense?
- is this possible?
- or can you recommend a more appropriate practice?

many thanks in advance
Giles
Reply With Quote
  #2  
Old 14th May 2007, 11:02 PM
landoncz's Avatar
landoncz Offline
Registered User
 
Join Date: Dec 2005
Location: Florida, USA
Age: 34
Posts: 338
No, sorry I don't think that makes much sense from a security standpoint. For security, you should be more concerned about permissions than folder naming. From a website maintenance standpoint, relative paths are usually the way to go sense they limit the amount of "hard coding" of directory names, thus making directory changes easier to manage.

Anything that apache has permissions to read, you should assume that people will be able to get to it via the web, whether they "guess" correctly or not. So, you should just set sensitive information with permissions so that apahce cannot read/write there...
__________________
Fedora Core 6 on Asus Z63A 14" Laptop
2.0 Ghz Pentium M
1 Gig RAM
100 Gig 7200 RPM

Code:
# rm -rf /dev/brain
Reply With Quote
  #3  
Old 19th May 2007, 08:13 PM
giles100 Offline
Registered User
 
Join Date: May 2007
Posts: 3
OK thanks, your comments pointed me in the right direction and I’m a lot clearer now on the difference between security and organisation. On the latter I’ve made some changes … but I’ve hit a snagging point. Goes like this … I’ve moved my includes files, templates, JavaScripts and CSS out of public_html to a new folder so I have :

ServerRoot/public_html
ServerRoot/moved_items/includes/
ServerRoot/moved_items/templates/
ServerRoot/moved_items/java/
ServerRoot/moved_items/css/

This works perfectly on my localhost (erm dare I say it’s currently erm windows) with expressions such as "../../../moved_items/css/", but not when I upload it to my FC4 server. My pages can see the includes folder and the template folder, but they appear NOT to be able to locate the css or JS folder and I’m lost to know why that is. Their all called with the same expressions so why should half work and half not.

More confusingly, placing the css folder on level up (as below) to test, DOES work …

ServerRoot/public_html
ServerRoot/css/

… am I missing something?
Reply With Quote
  #4  
Old 20th May 2007, 06:53 AM
marcrblevins's Avatar
marcrblevins Offline
Registered User
 
Join Date: Jun 2006
Location: Texas
Age: 42
Posts: 4,168
Dude, why don't you password protect those image folders? Search forum for htpasswd.
Reply With Quote
Reply

Tags
filepaths, securing

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Securing a VPS eXDee Security and Privacy 12 23rd September 2009 08:41 PM
Securing a vps eXDee Security and Privacy 2 26th March 2009 03:46 PM
Need help in securing /tmp beyond Security and Privacy 15 1st March 2005 01:45 PM


Current GMT-time: 06:59 (Tuesday, 21-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat