rightsproblem after reinstallation (6 posts)

Only the code was infected, the database was still okay.
I have removed all files of the website and placed my backup of the files.

The website works properly for the end users now.

However, there is a rights problem that occurs when placing new media files with the dashboard and by using the NextGen gallery. To be able to add mediafiles with the dashboard I set the rights of userfiles/uploads and wp-content/gallery temporary to 777. Add media files succeed and creating new nextgen galleries also. It now appears that newly added files has the owner/group 99 99. So that's the problem. The wordpressuser is now owner/group 99 99. For the 'reinstallation ' this was another owner/group.

Yesterday I used chown username:group userfiles/uploads and wp-content/gallery. This changed this maps to the correct owner/group.

But this is not the solution since the uploadprocess of WordPress and NextGen still wants to creates files/maps with owner/group 99/99. To keep it running I have to give this maps the 777 rights. And after every upload do the chown username:group trick.

How can I prevent WordPress to create files/maps with owner/group 99/99? Before the 'reinstallation' WordPress did not create files/maps with owner/group 99/99.