CHMOD Won't Change on Root Folder (Always 0) So, getting 403 error!

Discussion in 'Site & Server Administration' started by M3rC, Dec 29, 2008.

  1. #1
    hey guys,
    this morning I woke up to a nightmare!

    tried visitng my site (www.teenproblogger.net) but got a 403 error, so I searched it up on the net and people suggested it was the CHMOD permissions that were stuffed up.


    I check through my FTP and it was true my wordpress folder had a CHMOD of "0" (so everything unticked) but I can't change it either!


    Keep getting a an error;
    I'm using the latest version of FileZilla too,
    Please help :( as I'm unable to access any part of my siteee!
     
    M3rC, Dec 29, 2008 IP
  2. sawz

    sawz Prominent Member

    Messages:
    8,225
    Likes Received:
    808
    Best Answers:
    0
    Trophy Points:
    360
    #2
    try doing it using the file manager in your cpanel or equivalent.
     
    sawz, Dec 29, 2008 IP
  3. M3rC

    M3rC Peon

    Messages:
    1,493
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks sawz that seems to be working, however I have to change the CHMOD settins of each file there's nearly 2,000 files! :eek:

    At least I can access the files via my FTP (on the folders/files I CHMODED using your technique) which proves my files are still in tact..

    When I use your method and change the CHMOD settings of a specific folder/file - then I can access that folder/file using FileZilla.. so obviously it's a server-side error and web host should be able to fix it yeah..?
     
    M3rC, Dec 29, 2008 IP
  4. ckgni

    ckgni Active Member

    Messages:
    208
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    58
    #4
    Yes, cPanel could do it, else you have to contact your hosting company and ask them to do it.
    This because as a simple user you can't change the permissions of a folder that is CHMODed to 0, but the system adminstrator can do it with the root user account.
     
    ckgni, Dec 29, 2008 IP
  5. M3rC

    M3rC Peon

    Messages:
    1,493
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thank ckgni,
    I've sent a message with your suggestion and awaiting his reply :)
     
    M3rC, Dec 29, 2008 IP
  6. sawz

    sawz Prominent Member

    Messages:
    8,225
    Likes Received:
    808
    Best Answers:
    0
    Trophy Points:
    360
    #6
    i have a php script called permission setter, its what i call it.
    its supposed to reset all the permissions on all files and folders beneath it.

    i'll post it here, maybe it'll work for you. works for me.

    <?PHP 
       echo "Setting Permissions...";
       // Set file permissions to 644; read all, execute none, write user.
       echo shell_exec("find ~/public_html -type f -exec chmod 644 {} \;");
       // Set file permissions to 755; read all, execute all, write user
       echo shell_exec("find ~/public_html -type d -exec chmod 755 {} \;");
       echo "Permissions set.";
    ?> 
    Code (markup):
    this will do all files 0644 and all folders 0755.
     
    sawz, Dec 29, 2008 IP
  7. M3rC

    M3rC Peon

    Messages:
    1,493
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #7
    :eek::eek: That's awesome - just a tiny problem - how would I got about using it?
    I can run the PHP commands and launch it that way, but would you please be kind enough to follow me through it?

    Last thing I need right now is to mess up the files because of my impatience..

    btw - that method worked! I CHMODDED couple of the major files and the sites up and running partially with alot of errors though!
     
    M3rC, Dec 29, 2008 IP
  8. sawz

    sawz Prominent Member

    Messages:
    8,225
    Likes Received:
    808
    Best Answers:
    0
    Trophy Points:
    360
    #8
    i just upload it to the folder i want and call it up in a browser.
     
    sawz, Dec 29, 2008 IP
  9. M3rC

    M3rC Peon

    Messages:
    1,493
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Hmm.. I tried that but still the folders are CHMODDED to 0 :(

    I get the "Setting Permissions...Permissions set." but a clear-cache and F5 refresh still shows the errors, indicating the CHMOD errors
     
    M3rC, Dec 29, 2008 IP
  10. brock1

    brock1 Peon

    Messages:
    33
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I hate maintaing website but love the money that comes from it i had this same error give me a min and ill get the log so you can fix it
     
    brock1, Dec 29, 2008 IP
  11. sawz

    sawz Prominent Member

    Messages:
    8,225
    Likes Received:
    808
    Best Answers:
    0
    Trophy Points:
    360
    #11
    strange, if you want i can take a look at it.
     
    sawz, Dec 29, 2008 IP
  12. kaung

    kaung Twitter @KaungKo

    Messages:
    4,040
    Likes Received:
    187
    Best Answers:
    0
    Trophy Points:
    155
    #12
    Is that your sole account or do you operate others on the server?
    What I mean is if the files are chmodded to certain permission through root access (may it be you logging before as root, going to domain folder and changing permission), you can't chmod or change permission through individual account access.

    Also from my side, I see function include errors. It's either the files are not with correct permissions or you need to enable allow_url_include in php.ini file (which can be done through your host support if you're not familiar).
     
    kaung, Dec 29, 2008 IP
  13. M3rC

    M3rC Peon

    Messages:
    1,493
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Hey all,
    just found out the problem.

    One of the admins in my web-hosting service allowed me unlimited bandwidth. since the increase, I've hosted my second site on the same hosting - but another admin had "flagged" my account for too much resource consumption!! I can't beleive it though..that they just close my site like that.
    never the less, he said to recheck any scripts to minimize server load and update everything.

    So, hopefully they can unflag me and I can resume my normal work! Such a hectic day..thanks for all the support on this thread appreciate it :)
     
    M3rC, Dec 29, 2008 IP