Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Feb 2005
    Location
    UK
    Posts
    90
    Thanks
    1
    Thanked 0 Times in 0 Posts

    disable access for higher level folders

    Is it possible to chmodd or something a folder in such a way that the scripts it contains can only modify/write/read files in it's own directory or sub directories? But not higher level ones.

    The idea for this is so that if someone...compromised... the script, they could not do too much damage.

    note: this is just a random idea.
    Daniel
    XZIST.org

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,603
    Thanks
    0
    Thanked 645 Times in 635 Posts
    If you actually wanted to disable the script being able to access files at a higher level you could try searching the filename for ./ and not allow access if that is found anywhere in the name.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •