I’ve seen this problem before.
The fix for me was to SSH into my website and run the following:
chown USERNAME.USERNAME FILE.pdf
This assigned my “web user” access to the file, which allowed it to be downloaded via web browser. In my case, the permissions were lose when I migrated over from another server.
Also, you may want to try setting the permissions to 644 vs. 604.
Good luck!
Thread Starter
feh33
(@feh33)
Thanks Name Hero.
I think we are possibly on the right track with the user issue.
I am trying to work on connection with SSH. Having some login issues with root connection. This is all new to me… Still working out the password and now its locked me out from bad attempts….
But question, it is all the pdf and mp3 files including new ones I upload to the media files folder. So with this command is this only fixing each one individually?
I have not migrated to another server. But I created an admin role for someone to look at a plugin I purchased. When I deleted that admin user, wordpress asked me who to assign the things that user had created to. I mistakenly assigned it to a user that didn’t have admin role and then stupidly I deleted that user.. but couldn’t assign back on to me as that wasn’t an admin role.. (i don’t know how… but accidentally clicked..) ;-/ so I think maybe this has something to do with the issue? It is possible if its a user issue.. I didnt think this other admin role (for the plugin guy) had created anything so thought it wasn’t a problem. So I think I need to re-assign me as admin for whatever I passed permission over to to the non-admin now deleted role… to access all this..? If that makes any sense.. But for a blanket pdf and mp3 rule? Any ideas?
I have made many changes on the website in the last few weeks since the issue so would prefer not to go to an old backup and loose that… But as a last resort I think I can do that.. And hopefully it restores things back.
Thread Starter
feh33
(@feh33)
To further clarify… I know there’s an issue with this “user” I deleted as now I cannot make a new user with the same email again as it says “This email is already registered, please choose another one.” Even though I do not have a user with that email registered now. So possibly I just need to delete this user somewhere in the backend? Although I cannot remember the user name (sigh), but just the email i used for it…
Thread Starter
feh33
(@feh33)
I resolved this issue by going to a backup from several weeks ago. Was unable to fix otherwise.