Installed wordpress - Can't change Files!?

22 replies
I have installed wordpress through Cpanel, and when I try to modify any files in the admin area, it says I need to change permissions to be able to save updates.

I know what this means, but it has never happened before when I have installed wordpress, usually it is ready to be edited.

So now I need to know what files and permissions to change to get it normal, but safe. I tried changing a few file permissions, but now I get a 403 (Forbidden) page when trying to access wp-admin, or even just the plain site?

Help will be appreciated

- Skiphop
#change #files #installed #wordpress
  • Profile picture of the author dholowiski
    Well, Wordpress should be telling you which files need to have their permissions changed. Is it telling you it can't change the wp-config.php file?
    I would say, delete everything and try again, if this is a fresh install. If that doesn't work I would check with your hosting provider. Depending on how friendly they are, they might just fix the permissions for you.

    Take it from someone who has been there - messing with your Wordpress permissions without 100% understanding what you are doing is a BIG invitation to being hacked.
    Signature

    Immediate notifications when someone visits your web site. Free WordPress Plugin
    onepix.me

    {{ DiscussionBoard.errors[1590261].message }}
  • Profile picture of the author Istvan Horvath
    I agree with dholowiski: messing with permissions is dangerous.

    And editing the WP theme files online is also a sure recipe for disaster. As somebody pointed out - there is no undo "button" in the editor so you can easily screw up your design
    Signature

    {{ DiscussionBoard.errors[1590282].message }}
  • Profile picture of the author skiphop
    So no ideas or any resources, that may help me to do it manually?

    Thanks for your suggestions too guys

    Skiphop
    {{ DiscussionBoard.errors[1590517].message }}
    • Profile picture of the author Elle Holder
      Is this a fresh install, a domain forward or a reinstall?

      For a fresh install, I can't see why you would even be asked to play around with permissions.

      If you have just forwarded to a new host, you may need to update some of your paths. I've had it happen where I forgot to change the path of something after a forward, and I kept getting the permission error. I'd check, and my permissions were as they should be, but the path leading to the file was still pointing to my old host.

      Just a thought!
      Signature

      {{ DiscussionBoard.errors[1590574].message }}
      • Profile picture of the author luckygirrl
        usually with a new wordpress install i have found that u need to change the wp-config and some folders to permission 777 so they are writable and everything but usually wordpress tells u which ones need to be changed and what to change them to..i use filezilla for my ftp access and its very easy to change permissions that way
        {{ DiscussionBoard.errors[1590592].message }}
        • Profile picture of the author skiphop
          Originally Posted by luckygirrl View Post

          usually with a new wordpress install i have found that u need to change the wp-config and some folders to permission 777 so they are writable and everything but usually wordpress tells u which ones need to be changed and what to change them to..i use filezilla for my ftp access and its very easy to change permissions that way
          I also us Filezilla, and agree the file permission is very easy to change.

          Is there any need for 777 like you say? Wouldn't something like 744 be OK seen as you are the owner, and only you need to be able to change things? I am not an expert when it comes to these permission settings, but from reading the descriptions in the box where you change them, I assumed that you only need to change the top row to be able to have the control needed? I guess that's not rite?

          What exactly does changing permissions to 777 actually allow?

          Thanks Everyone!

          - Skiphop
          {{ DiscussionBoard.errors[1593541].message }}
          • Profile picture of the author Istvan Horvath
            Originally Posted by skiphop View Post

            What exactly does changing permissions to 777 actually allow?
            You allow... no, you invite hackers and everybody else to hack your blog/site. 777 = world writable

            In normal circumstances directories should be 755 and files 644.

            I am aware that on some servers in order to be be able to upload images (media) into your WP blog you need to change the permissions on the wp-content directory to 777. Or the permissions on the .htaccess file to 666 in order to change the permalinks.

            It is the same issue with editing the template files of a theme online. On most hosts you have to change the permissions of the template files to 666 (= world writable!). Beside the fact that there is no "undo" button if something went wrong, you leave your blog vulnerable for hacking. Becsue most bloggers don't change it back to 644 after editing...

            I always suggest to edit the files on your computer in a simple text editor (like notepad) and upload them via FTP. Of course, before editing save an unaltered copy that you can upload if your edits are wrong.
            Signature

            {{ DiscussionBoard.errors[1593669].message }}
            • Profile picture of the author NowIstheTime
              Originally Posted by Istvan Horvath View Post

              You allow... no, you invite hackers and everybody else to hack your blog/site. 777 = world writable

              ...

              Beside the fact that there is no "undo" button if something went wrong, you leave your blog vulnerable for hacking. Becsue most bloggers don't change it back to 644 after editing...

              I always suggest to edit the files on your computer in a simple text editor (like notepad) and upload them via FTP. Of course, before editing save an unaltered copy that you can upload if your edits are wrong.
              I strongly agree with the above! It is easy to be lazy, and its just as common when you're feeling lazy to put a simple bracket, comma, question mark somewhere in the php/htaccess/etc. file and then spend hours trying to find it..

              So filezilla or any other ftp software is a good (and preferred) way to do it.

              I haven't used filezilla, but in winSCP if you doubleclick on the file on the server, it downloads it and opens it up for editing.. .any saves you make are instantly uploaded to the remote server, so working on files such as template files, .htaccess files is as easy as working on them on your local PC (err.. and MAC). I'm sure filezilla offers such a feature as well..

              But the above procedures are for that time when you just feel TOO lazy to open up an additional app, and you know we've all been there...
              {{ DiscussionBoard.errors[1593748].message }}
            • Profile picture of the author Steve Powers
              Originally Posted by Istvan Horvath View Post

              You allow... no, you invite hackers and everybody else to hack your blog/site. 777 = world writable

              In normal circumstances directories should be 755 and files 644.

              I am aware that on some servers in order to be be able to upload images (media) into your WP blog you need to change the permissions on the wp-content directory to 777. Or the permissions on the .htaccess file to 666 in order to change the permalinks.

              It is the same issue with editing the template files of a theme online. On most hosts you have to change the permissions of the template files to 666 (= world writable!). Beside the fact that there is no "undo" button if something went wrong, you leave your blog vulnerable for hacking. Becsue most bloggers don't change it back to 644 after editing...

              I always suggest to edit the files on your computer in a simple text editor (like notepad) and upload them via FTP. Of course, before editing save an unaltered copy that you can upload if your edits are wrong.
              Nice tips,and thank you very much.I think you did a good job in permission?Sometimes,many problems are just caused by permission problem after editing or downloading.So we should pay more attention to it.
              Signature
              HostEase Web Hosting
              20% for shared web hosting with coupon code "hostease"! $7.95 per domain with coupon code "695TLD"!
              99.9% Uptime Guarantee! 30 Day Money Back Guarantee! 24/7/365 Customer Support!
              {{ DiscussionBoard.errors[1593776].message }}
          • Profile picture of the author NowIstheTime
            Originally Posted by skiphop View Post


            Is there any need for 777 like you say? Wouldn't something like 744 be OK seen as you are the owner, and only you need to be able to change things? ...

            What exactly does changing permissions to 777 actually allow?

            - Skiphop
            Hi Skiphop, Hmm.. yes very strange that it didn't install with the permissions necessary to allow you to edit the theme files from within the wp-dashboard...

            But most cpanel hosts allow you to 'get away' with 755 permissions on files and directories... using some backend file permission magic...allowing you to write to these files.

            Anyway.. here's a quick way to break down this 777 number.
            the left most 7 represents YOUR perms
            the middle 7 represents GROUP perms
            the rightmost 7 represents EVERYONE/WORLD/ALL

            So what is the breakdown of this 7?
            4 = read perms
            2 = write perms
            1 = execute perms

            So if you wanted to give group and world read-only access with you having full-perms, you would only give them 4 and yourself 7...so 744.

            But since (I believe a PHP file is 'executed' by the server) you would need to give php files 'execute permission.
            so 755 is required. whereas for html files 644 would suffice (even YOU don't execute a html file, so giving a html file 744 is redundant )

            ---

            Remember, the web server USUALLY operates as EVERYONE/ALL so the rightmost digit of 755 is what matters for it.

            Anyway in filezilla, you should go to the directory that holds your current theme: ex. /wp-content/themes/theme-name and give it AND everything under it 755 permissions.

            See if this works and let us all know.

            Cheers!
            {{ DiscussionBoard.errors[1593705].message }}
      • Profile picture of the author skiphop
        Originally Posted by ElleJ View Post

        Is this a fresh install, a domain forward or a reinstall?

        For a fresh install, I can't see why you would even be asked to play around with permissions.

        If you have just forwarded to a new host, you may need to update some of your paths. I've had it happen where I forgot to change the path of something after a forward, and I kept getting the permission error. I'd check, and my permissions were as they should be, but the path leading to the file was still pointing to my old host.

        Just a thought!
        This was a fresh Install, on a new domain.com

        I agree, I don't know why I have to play around with the permissions either, it has never happened before? Usually I just install via Fantastico, then I'm ready to rock, but not this time!

        Interested in what you say about paths to files, what do you mean, and what particular files are you reffering to? (Just for future reference)

        Thanks!

        - Skiphop
        {{ DiscussionBoard.errors[1593512].message }}
  • Profile picture of the author NewbiesDiary
    delete it and try again - you could spend hours trying to figure this out and about 3 minutes to delete and start again. How much is your time worth?

    I agree it's interesting to know - but unless it happens again I wouldn't worry about it.
    {{ DiscussionBoard.errors[1593554].message }}
  • Profile picture of the author danalingga
    Ask your web hosting support, if it is great support they will tell you what exactly happen.
    Signature
    {{ DiscussionBoard.errors[1593556].message }}
  • Profile picture of the author skiphop
    Just An Update: I have tried re-installing wordpress, and the same thing happens all the time, I keep getting the Permission Messages!

    So I tried changing some file permissions and still no luck.

    I don't Understand this? Could it be something to do with Cpanel, Fantastico, or even my Host?

    I didn't have these problems before with other wordpress blogs I own, and I have never seen/heard anyone mention this in any wordpress tutorials or courses.

    VERY FRUSTRATED
    {{ DiscussionBoard.errors[1675374].message }}
  • Profile picture of the author NowIstheTime
    Who is your hoster?


    Try googling for your hosting service + wordpress and the type of error you get.. that you usually helps me find any server specific changes that need to be made.

    ex. "hostgator wordpress 403" or "bluehost wordpress wp-admin" ... etc..

    See if that turns up anything... if not... just PM me and I'll see if I can help.
    {{ DiscussionBoard.errors[1675532].message }}
  • Profile picture of the author cashcow
    Whenever this happens to me (I find it to be dependent on the hosting), I simply change the permission of the file I want to edit to 777 and then once I make the edits I just change it back to whatever it was before.

    Alternatively, simply ftp the file to your computer, change it there and then ftp it back up.

    Unless what is happening to you is different from what has happened to me in the past, it is only the file you are trying to change that needs the permission modified.

    Lee
    Signature
    Gone Fishing
    {{ DiscussionBoard.errors[1675570].message }}
  • Profile picture of the author lusi34
    Safe tips: do your editing offline and then upload it after you've done with it.
    Install Xampp, or Appserv or anything you like so you can install wordpress in your computer. You can do whatever you want offline, editing themes, trying pulgins etc.

    After you've done you can upload the files you change to replace the original files. I've done this several times when I got trouble like yours. It's safer, faster, no headache at all.

    Just my experience.
    Signature
    {{ DiscussionBoard.errors[1687076].message }}
    • Profile picture of the author rosetrees
      have you tried installing WP manually?

      I had a similar experience a few weeks ago. I set up a new hosting account with its own cpanel and installed WP via fantastico. Wordpress refused to update to the latest version.

      Three times I removed the entire account and started again - and three times more it refused to update.

      Then I decided to start once more and do a manual install - it worked fine.

      No idea what the problem was - a few days later I set up another domain via fantastico and it worked first time.
      {{ DiscussionBoard.errors[1687195].message }}
  • Profile picture of the author Andyf
    Hi,

    This is a good discussion....

    I noticed my files and directories in the one blog I have seemed to be OK as far as the permissions go. However, there is one file, wp-config.php that has a 666 permission.

    Any thoughts on that? Why is that one 666? Is this needed by my server or something?

    Thanks!

    Andyf
    Signature
    {{ DiscussionBoard.errors[1687476].message }}
    • Profile picture of the author stevendbrady
      This is why I *HATE* some of the automated installers. It may seemingly set the permissions "correctly" but doesn't actually modify the ownership, disallowing you to change any files through FTP or SSH. When the installers setup, files can often be owned by root, httpd, or apache users. Removing and reinstalling manually might be the best option, or talk to the host about who actually has the ownership of your files. It may be a configuration error on their part and easily fixable.

      If they can't or won't help you, and you can't get WordPress setup on your own, feel free to drop a PM and I can give you a hand.
      {{ DiscussionBoard.errors[1687968].message }}
    • Profile picture of the author Istvan Horvath
      Originally Posted by Andyf View Post

      [...]there is one file, wp-config.php that has a 666 permission.

      Any thoughts on that? Why is that one 666? Is this needed by my server or something?
      Question before the thoughts. Was this an automatic install? If yes - you have the answer.
      Signature

      {{ DiscussionBoard.errors[1688033].message }}
    • Profile picture of the author stevendbrady
      Originally Posted by Andyf View Post

      Any thoughts on that? Why is that one 666? Is this needed by my server or something?
      666 is a rw-rw-rw- permission, could even be restricted to 644, which is what all of mine are. (rw-r--r--). It doesn't need to be written or executed by the world, WP just pulls configuration options from it.

      You can get a better idea of chmod permission from this site:
      Web Site Design Chmod Generator Set File Permissions

      Just tick boxes until you get the desired result and you'll understand how secure your files are.
      {{ DiscussionBoard.errors[1688080].message }}

Trending Topics