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:
Would changing the owner group to daemon:daemon help (from bitnami:bitnami)?
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
answered 26 Dec '11, 18:41
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:
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.
answered 27 Dec '11, 05:34