can't upload files to wordpress after update

#1
Hello.

I have 2 wordpress sites on an openlitespeed server.

I updated openlitespeed and cyberpanel and i have the following issue.

I can't upload images to wordpress. I get this error message:

The uploaded file could not be moved to wp-content/uploads/2019/11

I solved it this morning by giving writing privileges to user nobody via:

chown -R nobody /home/enallaktikiagenda.gr/public_html/wp-content/uploads/

It happened again and the fix does not work this time.

People suggest to change folder permissions from 755 to 777 but don't want to do that.

It doesn't seem secure.

Any advice please?

I really need to sort it out asap.

thanks
 
#5
I was looking at this issue today.

Both user and group was set to the owner which is how it should be. However, couldnt upload anything so changed it initially to nobody for both owner and group which allowed me to upload.

Further testing I changed the user back to the owner keeping nobody group. Uploads worked.

Then changed it back to its original settings. Uploads worked.

However, restarting ols through the webadmin reverted it back to not being able to upload and had to change the uploads directory to user and group nobody again

Something is wrong here...
 
#7
I think I narrowed it down to the site which was running in PHP detached mode. I changed it from detached mode and restarted and the permissions were reset.

Does detached mode run as nobody?
 
#9
I was looking at this issue today.

Both user and group was set to the owner which is how it should be. However, couldnt upload anything so changed it initially to nobody for both owner and group which allowed me to upload.

Further testing I changed the user back to the owner keeping nobody group. Uploads worked.

Then changed it back to its original settings. Uploads worked.

However, restarting ols through the webadmin reverted it back to not being able to upload and had to change the uploads directory to user and group nobody again

Something is wrong here...
The same here
 

David

Active Member
#10
Can you do such a test, (restart here means `killall -9 openlitespeed` and start the serive)
1, Add "runOnStartUp 2" to the lsphp config block, restart
2, downgrade to 1.5.7 and restart, you may use /usr/local/lsws/admin/misc/testbeta.sh -d 1.5.7
3, upgrade to 1.5.9 pre-release version in which we added some track log to trace the reason,
you may use /usr/local/lsws/admin/misc/testbeta.sh -d 1.5.9 and restart.
If you still have the issue happen, please create a ticket and we will be glad to figure out.
Thanks.
David
 
Top