0

When a user uploads a file and I want to move it from temp directory to upload directory, I got this error message in the browser:

Warning: move_uploaded_file(/var/www/html/crm/upload/36379.jpg): failed to open stream: Permission denied in /var/www/html/crm/register_free_adviser.php on line 373

Warning: move_uploaded_file(): Unable to move '/tmp/phpeXf3DM' to '/var/www/html/crm/upload/36379.jpg' in /var/www/html/crm/register_free_adviser.php on line 373
bool(false)

OS: centOS 7

the project works fine on my system which runs windows,XAMPP,apache. but on my server which runs centOS I have issues.

I tried this solution but the problem didn't get solved.

ADyson
  • 57,178
  • 14
  • 51
  • 63
  • You have to give the account which runs the apache process permission to write to the folder. That link you provided contains the correct idea, but of course we cannot see your server or your filesystem, so we cannot see how you applied the permissions on your centOS server, or what exactly you would need to do to correct them. – ADyson Nov 20 '22 at 22:26

0 Answers0