In my previous host, files and folders in /wp-content/upload/ had permissions 755. When I migrated to ec2 bitnami the /upload/ folder retained the 755 permission structure. Yet, now Wordpress users can no longer upload new files into an existing 755 folder (eg, upload a new image to an existing album for which folder with 755 permission already exists) or upload a file for which a new folder needs to be created first (eg, a new user cannot upload her avatar, as the system does not allow to create new folder in which to place the file).

I saw that the permissions in the orginal bitnami folder /wp-content/upload/ (prior to migration) was 775. Do I need to change all permissions in the files and folders contained in /wp-content/upload/ to 775? Or can I leave permissions as they are and do something else to enable uploads? Changing permissions of all files and folders is quite cumbersome.

Please note that Wordpress Codex recommends not to have 775 folders:

No directories should ever be given 777, even upload directories. Since the php process is running as the owner of the files, it gets the owners permissions and can write to even a 755 directory.

Would changing the owner group to daemon:daemon help (from bitnami:bitnami)?

Thanks!

asked 26 Dec '11, 11:52

Gregor's gravatar image

Gregor
91171722
accept rate: 12%

edited 26 Dec '11, 12:01


my friend,

are you sure than the owner from wp-content/uploads is the bitnami user and not the root user?, I say because I just do: sudo chown bitnami:bitnami uploads

link

answered 26 Dec '11, 18:41

lpalomo's gravatar image

lpalomo
26334
accept rate: 33%

Uploads work correctly, if folders/files have the owner/group daemon/daemon, not bitnami/bitnami. Uploads work with permissions = 755, as recommended by Wordpress codex.

To change owner and group all folders and files in /wp-content/uploads/ run this command:

$ sudo chown -R daemon:daemon /opt/bitnami/apps/wordpress/htdocs/wp-content/uploads

If Bitnami does not mention this to its wiki or FAQ, I recommend to add: After migrating to EC2, check owner/group settings of your folders so that users can upload files. This is especially important for WordPress sites with user registration/membership, eg, for a forum or social network like BuddyPress.

link

answered 27 Dec '11, 05:34

Gregor's gravatar image

Gregor
91171722
accept rate: 12%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×357
×27
×26

Asked: 26 Dec '11, 11:52

Seen: 2,061 times

Last updated: 27 Dec '11, 05:34

powered by BitNami OSQA