1
votes

I am working with two different servers, and uploading files between them. From one to another. But that is not working. It worked when both are on my localhost, but when I want to upload file from my localhost onto another server that is a cloud server. It is giving me this error:

Warning:  move_uploaded_file(/var/www/data/user-blue.png): failed to open stream: 

Permission denied in /var/www/upload.php on line 67



Warning:  move_uploaded_file(): Unable to move '/tmp/phpVBiLvB' to '/var/www/data/user-blue.png' in /var/www/upload.php on line 67

How do I fix permissions on the cloud server? I have full root access if it is needed.

2

2 Answers

2
votes

chmod on your directory to read write execute. Or give user permissions to te directory.

0
votes

If you are using Mac OS, here are the simple steps you need to take to solve this problem of permission:

  1. Double click on your upload folder to get options
  2. Click on "Get info"
  3. Scroll down, in the left bottom corner, you will see a padlock, unlock it with your pc password
  4. Then you will see permissions in bottom, change the permissions to read and write
  5. Problem solved. unless your script has a problem