• Dumb question…I can’t edit my files on my localhost. I know I need to set some permissions but don’t know how.

    In Terminal (Mac OS X)

    cd /library/webserver/
    chmod 666 ????

    What do I write after that? I want to change the permissions on all files in WP

Viewing 7 replies - 1 through 7 (of 7 total)
  • What permissions do they have at the moment?

    You shouldn’t need to do what you are doing, but if you want to do it anyway, you can do:
    chmod -R 666 * BUT BUT…
    that may have a disastrous effect on your directories/folders.

    To make a tree writable by the user try:
    chmod -R u+w *
    and writable by group
    chmod -R g+w *

    ‘-R’ means recurse through the directory tree.

    Another option is to use find:
    find . -type f -exec chmod u+w {} \;

    But, why do you need to do this???

    Thread Starter Tommy

    (@tommy)

    I wish I knew that. I can’t edit my files…do I need to create an .htaccess file in my directory?

    If so, how do I do it? I use BBEdit but it won’t save it as .htaccess or even let me rename the file.

    I downloaded my old file (.htaccess) but it disappeares on my desktop since it’s a hidden file. Tinkertool won’t show it for me…how can I move it?

    Thread Starter Tommy

    (@tommy)

    Just to clarify…I can’t edit the files in the Theme Editor. It says “If this file was writable….”

    ejm

    (@llizard)

    Tommy, can you ftp? If so, you could chmod the files from there. Try chmodding files to 644 and folders to 755 (I wouldn’t recommend 666 or 777; your server might not allow it – mine doesn’t) This is what the folders and files are set to in my wordpress folder.

    chmod:
    The first number is for owner.
    The second number is for group.
    The third number is for the whole world.

    r=read; w=write; x=execute
    rwx = 7; r-x = 5; rw- = 6; r– = 4

    Having said all that, I’m NOT an expert in this. I know very little about chmod. The above comes from a php friend who tried to explain it to me.

    Ming

    (@ming)

    ‘If the file was writable…’

    So you need to make that file and not the whole directory writable. In 1.5 navigate to the wp-content/themes/name of your theme/ and you’ll see a list of files you can edit. If you wanted to edit single.php, you would type:
    chmod 666 single.php

    Do the same for any other file you want to edit.

    ejm

    (@llizard)

    Might I suggest that you first try 644 with that single file? Then try 664… and for folders 755. If that doesn’t work, try 775…. No need to make possible trouble for yourself by just going ahead and letting the world write to your files.

    (It’s quite possible that your server will not allow you to set file permissions to 666 or 777. If you do use 666 or 777, your server might disallow those permissions and then your site will throw out errors. This happened recently to two of my colleagues when our host tightened security and disallowed 666 and 777.)

    I had the same problems and 777 solved them.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Edit files in WP 1.5’ is closed to new replies.