Permissions and user ownership problems when uploading
-
Hi all,
This is a slightly different problem that other people have been having with image uploading. I can upload images okay via the Media Library and the folders get created properly (with year/date separation), but the browser doesn’t have access to them. I just get missing image icons when viewing them in webpages, or a 403 “forbidden, access denied” if I try to access the direct URL of the image.I’ve spent a day digging into it and this is what I’ve found out already:
- The folders and image thumbnails are all created properly
- The usergroup (not the user) for the created folders and files uploaded via the Media Library is different from any other files, it’s set to “webusers”, not “users”
- The file permissions for these files are 640 and folders are 750
- If I do my own PHP uploader script, the usergroup for any files that I upload with that is set to “users”, and I can see the files from the browser (the file permission is set to 644)
- In either case, if I FTP to the site, any chmod command seems to be ignored, so I can’t change or manipulate the permissions.
I’ve tried using these definitions in the wp-config.php file:
- define(‘FS_CHMOD_FILE’,0755);
- define(‘FS_CHMOD_DIR’,0755);
But they didn’t do anything. The file permissions are the same when I delete and re-upload the files. (BTW, is just putting these into wp-config.php enough? I don’t have to reinstall the website do I?)
So that’s where I am at the moment. I’m going to contact my service provider as well to see what they’ve got to say on the matter.
Thanks for any help you can give,
Andy
- The topic ‘Permissions and user ownership problems when uploading’ is closed to new replies.