default protection when expand tar.gz

Discussion in 'Site & Server Administration' started by web site blogger, Nov 7, 2008.

  1. #1
    Hi.

    Does anyone know what determines the default protection when you expand a tar.gz from cpanels file manager?
     
    web site blogger, Nov 7, 2008 IP
  2. root1987

    root1987 Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    can you explain more ?
     
    root1987, Nov 7, 2008 IP
  3. web site blogger

    web site blogger Peon

    Messages:
    52
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Sorry I wrote protection in the title when I meant **permission**. Tired last week.

    I upload a tar.gz and then use cpanel file manager to expand it on my server creating files and folders I added.

    On my previous host - servers I get a permission of 755. On my new host I am getting permission=777 on folders and have to change them. Just wanted to know what determines the permission when I expand?

    If I try to view a page from the folder with permission 777 I get RC=500 - internal server error.
     
    web site blogger, Nov 11, 2008 IP
  4. Mxhub

    Mxhub Active Member

    Messages:
    474
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #4
    It depend on whether your server is suphp-enabled or not..
    For a suphp enabled server environment, all files/directories had to be set to 755 for security reason.

    So, your new host probably do not have suphp enabled which could be a risk..

    --
    joseph
     
    Mxhub, Nov 12, 2008 IP
  5. web site blogger

    web site blogger Peon

    Messages:
    52
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Well my current host REQUIRES that I have 755. [Actually all I KNOW is that 777 gives a server error and 755 is OK.]

    So as I understand what you wrote, that means suphp is enabled and that means it's not a problem. Right?

    Do you have a link for the best place to read about what the problem is or what suphp is anyway?
     
    web site blogger, Nov 14, 2008 IP
  6. web site blogger

    web site blogger Peon

    Messages:
    52
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Further information on what decides the permission:

    1. When I expanded another tar.gz only folders that already EXISTED got 777, new folders got 755.
    2. I tried uploading a test tar.gz with windows folder properties set to hidden, system, read-only and archive before I made the tar.gz - this makes no differrence at all (not surprised since the server is unix but just trying things)
    3. I notice that when expanding a tar.gz there are options to expand with or without permissions saved.

    #1 Could be the answer to my question but my feeling at the moment is I don't trust it.

    #3 is probably the correct way to go but that means I must use something other than 7zip to make the tar.gz ... new question - any freeware suggestion for an archive maker that makes tar.gz and allows you to specify permissions?
     
    web site blogger, Nov 14, 2008 IP