gregor at December 26th, 2011 11:52 — #1
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
Would changing the owner group to daemon:daemon help (from bitnami:bitnami)?
lpalomo at December 26th, 2011 18:41 — #2
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
gregor at December 27th, 2011 05:34 — #3
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.
kelly_thomas at July 26th, 2013 15:56 — #4
This worked for me....
sudo chown -v -R bitnami:bitnami /opt/bitnami/apps/wordpress/htdocs/wp-content/uploads
tk120404 at July 26th, 2013 16:03 — #5
Make sure u dont change it to root if it is not working for bitnami or daemon
kelly_thomas at August 7th, 2013 16:29 — #6
Correction: I have PLUGINS set to
drwxrwxr-x 32 bitnami daemon 4096 Jul 31 20:41 plugins
drwxr-xr-x 2 bitnami bitnami 4096 Jul 31 20:41 upgrade
drwxrwxr-x 6 daemon daemon 4096 Jul 26 20:26 uploads
These seem to be working as expected.