skip to Main Content

You need to make this file writable before you can save your changes. See Changing File Permissions for more information

2

Answers


  1. Chosen as BEST ANSWER

    I have fixed this by a command :- sudo chmod -R 777 "filepath"


  2. Make sure you’ve the correct permissions to edit the files in your FTP or File manager in Cpanel. You don’t have any permissions to edit the required files. Let me explain what the File permission is and how to enable it.

    What are file permissions?

    This is a method of administering access rights to certain files of your site. There are 3 types of permissions, read, write, and execute. Each of these types can be defined per a certain user group. These include owner permissions, group permissions, and public permissions. Some host’s security settings do not have the ideal WordPress permissions set by default, you’ll have to add this yourself. You don’t need to worry about all these technical details. All you need to remember is the number: 666.

    Changing file permissions in FTP

    This is probably the quickest way of changing the file permissions for all of your template files in one swift command. Open up your favorite FTP client, navigate to your template directory (with style.css, index.php, etc.) and select all .php and .css files. Do not select images or subdirectories.

    You can press CTRL + A to select them all, and click while holding CTRL to deselect items like images. After selecting the File Attributes option from the menu, you can change all the permissions to 666. You’ll notice the the group and public write permissions will automatically checked off.

    After pressing OK all the permissions to the files you selected should be changed to -rw-rw-rw-. You should now be able to edit them via the theme editor.

    Changing permissions in cPanel

    You can also do this in cPanel, although not in bulk (for the version of cPanel I’m using anyway). Open up the file manager, navigate to the template directory (similar to FTP) and click on the file you want to change permissions for.
    Change each one to 666, as before. This could be useful if you don’t have access to an FTP client, or just want to selectively make files writable.

    You may see different sources telling you to set everything to 777, which gives everybody full permissions. I wouldn’t recommend this. Although it would work, it may open up security holes on your site. The 666 permissions are just enough for the text files you’ll be editing.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search