1

I built a WP site on a particular server. I did not set or change any folder permissions and everything worked perfectly. Mainly, I could upload files and images.

I then moved the install to a different server and domain. Suddenly I could not upload to the media library.

On checking the permissions of the wp-content folder and its sub-folders the permissions were set to 755. I only assume this is what they were set to on the previous server.

By setting them to 777 I could then upload files but understand this is a big security risk. I then set it back to 755 and cannot upload again.

Can anyone explain why 755 is ok on one server but not on another please? and what I could do on the new server to make 755 acceptable?

Scott Eldo
  • 473
  • 11
  • 28
  • You better leave server user permission info, for example, you(ftp) are the owner of files or something for both of servers. – DeGi Aug 28 '14 at 23:09

1 Answers1

0

The file permissions are correct 755, you'll have to check the file owner also. Do not assume the file permision and owner on the development server will be correct on other servers (different os's can give issues as the one you have, different webservers from different os's can give again issues as above).

It also depends on the way you upload your files:

-you can do it throw ftp then you'll have to check the ftp settings (how it saves the files, under which user).

-if you use ssh to upload then it depends on the user that you used to connect to the server and so on... (I saw the ftp tag but wanted to describe this also )

At this point you'll have to make sure that the website files have as owner the webserver (different server setups require different websrevers - www-data vs apache vs ... )

In the end it depends on the control (options you can change) on the server, do you have ssh access? Do you have to contact your host for this corrections?

If you are not administrating this new domain server then contact it's administrator it is a setting issue(of the ftp ) or a bug/error that he should handle.