0

I am hosting one of my Wordpress sites on a local LAMP in opensuse. I have transferred the site from my backup but when it was installed the site was broken somehow and if try to delete, edit or even change the permission of any file or directory using ftp access, it does not execute and shows up this error "550 Permission denied."

2 Answers 2

1

Answer #1

Open up a Terminal session to the root of the folder you wish to change everything in.

The type the following and press enter after each one:

find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;

The first one will find all directories and give them a permission of 755. The second one with find all files and give them permission of 644. This will work recursively down from where you are.

/
|-usr/
|-var/
  |-www/
    |-public_html/
      |-personal/
      |-wordpressblog/
        |-admin/
        |-catalog/
          |-new/
          |-old/
        |-images
        |-scripts
          |-linux
          |-windows
            |-exec
        |-index.php
        |-admin.php
|-root/
|-share/
|-etc/

Using the crudely made diagram above, if you wanted to do it for /var/www/public_html/wordpressblog then you would need to CD to that directory and then run the above commands.

If you ran it from /var/www/public_html then it would carry the same permissions effect to the /var/www/public_html/personal folder too.

If your wordpress blog is just hosted directly in the .../public_html folder, then CD to there and run the commands.


Answer #2

You are not assigned as the owner of the directory and all of it's subdirectories/files. You will need to open Terminal and type sudo chown -R username:usergroup to change the files and folders (using the same directory technique as above) to change everything to the FTP user so that you can change the files as required.

1
  • But the local server site is also broken because of restricted file permission I think. Have a look at; 69.77.180.198/wp Jan 27, 2014 at 4:51
0

Folder permissions must be set to 755 and those for files must be 644.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .