CHMOD 666 Dangers

Discussion in 'Programming' started by adbox, Sep 21, 2009.

  1. #1
    What are the dangers of having a file with permissions set to 666?

    adbox
     
    adbox, Sep 21, 2009 IP
  2. sahilkotak

    sahilkotak Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,

    I think with that permissions you give right of writing on file. So that can be very much harmful for your site.
     
    sahilkotak, Sep 21, 2009 IP
  3. adbox

    adbox Well-Known Member

    Messages:
    906
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    155
    Digital Goods:
    1
    #3
    why can I only use fwrite functions when file is chmodded 666 on some servers, and am able to write normally when file is chmodded 644 on others?
     
    adbox, Sep 21, 2009 IP
  4. adbox

    adbox Well-Known Member

    Messages:
    906
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    155
    Digital Goods:
    1
    #4
    Or let me rephrase,

    I am with hostmonster, and I can fwrite to my own server when file has permissions set to 644, but it seems that on other servers, I must set to 666 to have php fwrite work correctly.

    Can anyone help me or tell me why this might be?

    adbox
     
    adbox, Sep 21, 2009 IP
  5. SecureCP

    SecureCP Guest

    Messages:
    226
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Sounds like HostMonster has SuPHP installed on your server.
     
    SecureCP, Sep 22, 2009 IP
  6. adbox

    adbox Well-Known Member

    Messages:
    906
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    155
    Digital Goods:
    1
    #6
    Is there a way around having your file chmodded to 666 to fwrite it?
     
    adbox, Sep 23, 2009 IP
  7. SecureCP

    SecureCP Guest

    Messages:
    226
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Have SuPHP installed, if they refuse, get a new host.
     
    SecureCP, Sep 24, 2009 IP
  8. matessim

    matessim Active Member

    Messages:
    514
    Likes Received:
    5
    Best Answers:
    1
    Trophy Points:
    70
    #8
    well, its the number of the beast.
     
    matessim, Sep 25, 2009 IP
  9. SGBoise

    SGBoise Peon

    Messages:
    647
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #9
    It just depends on how they setup the apache to run. It's not really a big deal just change the permissions of the file and move one.
     
    SGBoise, Sep 27, 2009 IP