What Permission is needed

Discussion in 'Site & Server Administration' started by t0mb, Oct 9, 2007.

  1. #1
    I have a page that links to a javascript file which contains all of the content of that page. I need the file to work for everyone, but it can only be viewed by myself. What permission is needed?
     
    t0mb, Oct 9, 2007 IP
  2. chickens

    chickens Peon

    Messages:
    242
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    For javascript to work the client will have to be able to read the file. This is because javascript is a client side language. It is parsed by the client (normally a browser).

    The permissions for this file should be 744.

    A *NIX permissions calculator: http://www.csgnetwork.com/csgchmodcalc.html
     
    chickens, Oct 9, 2007 IP
  3. t0mb

    t0mb Active Member

    Messages:
    1,116
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #3
    Is there any way using javascript to make it not viewable but still usable? Or will I have to make it server side?
     
    t0mb, Oct 9, 2007 IP
  4. chickens

    chickens Peon

    Messages:
    242
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Javascript will always be viewable to the client. You can use some things to encrypt the javascript, but as the browser has to do the interpretation it is very easy to break.

    To totally hide your code it will have to be done in a server side language. Or you can just be like google and make your code so complex its painful to try and figure out. :D
     
    chickens, Oct 9, 2007 IP
  5. t0mb

    t0mb Active Member

    Messages:
    1,116
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #5
    OK thanks for your help!
     
    t0mb, Oct 9, 2007 IP