PHP: Is permission 777 a security issue?
<p>I'm trying to upload a file with an html/ php form.
And I keep getting this error:</p>

<blockquote>
  <p>PHP Warning:  move_uploaded_file(/var/www/html/envioDoc/archivosAlumnos/archivo-dni-): failed to open stream: Permission denied in /var/www/html/envioDoc/avisos-de-pago.php on line 45, referer: <a href="http://54.85.84.42/envioDoc/index.html" rel="nofollow">http://54.85.84.42/envioDoc/index.html</a></p>
</blockquote>

<p>Line 45 in my php file is the move_uploaded_file() function.</p>

<p>So, I've done this at the command line on the server:</p>

<pre><code>ps aux | grep httpd
</code></pre>

<p>The first column of the result is my logged in username: ubuntu</p>

<p>And after that:</p>

<pre><code>sudo chown ubuntu /var/www/html/envioDoc/archivosAlumnos

chmod -R 0755 /var/www/html/envioDoc/archivosAlumnos
</code></pre>

<p>But the error kept appearing, so I've changed the perms to 0777.</p>

<p>Is that insecure? Why it didn't worked with 0755?</p>