<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blog @pedropablo &#187; PHP</title>
	<atom:link href="http://blog.pdropablo.net/archivo/php/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.pdropablo.net</link>
	<description>bla, bla, blaaaah...</description>
	<lastBuildDate>Thu, 02 Sep 2010 11:54:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>FTP ERROR 550, la solución</title>
		<link>http://blog.pdropablo.net/2010/01/ftp-error-550-la-solucion.html</link>
		<comments>http://blog.pdropablo.net/2010/01/ftp-error-550-la-solucion.html#comments</comments>
		<pubDate>Wed, 27 Jan 2010 16:44:31 +0000</pubDate>
		<dc:creator>pedropablo</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[Soluciones]]></category>

		<guid isPermaLink="false">http://blog.pdropablo.net/?p=135</guid>
		<description><![CDATA[Es increíble, después de estar una semana buscando la manera de poder borrar unas carpetas que tenía en el FTP, no podía ni borrar los archivos que habían dentro de ellas. FTP ERROR 550 Así que buscando y buscando, al fin he podido y todo gracias a este código PHP, que ha sido mi solución, [...]]]></description>
			<content:encoded><![CDATA[<p>Es increíble, después de estar una semana buscando la manera de poder borrar unas carpetas que tenía en el FTP, no podía ni borrar los archivos que habían dentro de ellas.</p>
<p style="text-align: center;"><a href="http://blog.pdropablo.net/wp-content/uploads/2010/01/errorftp.jpg" rel="lightbox[135]"><img class="aligncenter" title="FTP ERROR 550" src="http://blog.pdropablo.net/wp-content/uploads/2010/01/errorftp.jpg" alt="" width="500" height="150" /></a><span style="font-size: xx-small;">FTP ERROR 550</span></p>
<p>Así que buscando y buscando, al fin he podido y todo <a href="http://drupal.org/node/233321#comment-1513148">gracias a este código PHP</a>, que ha sido mi solución, y la de muchos que se encuentren  con este error y no puedan solucionarlo de otras formas.</p>
<pre class="brush: php;">
&lt;?php
function rchmod($parent, $dmod, $fmod) {
	if (is_dir($parent)) {
		$old = umask(0000);
		chmod($parent, $dmod);
		umask($old);
		if ($handle = opendir($parent)) {
			while (($file = readdir($handle)) !== false) {
				if ($file === &quot;.&quot; or $file === &quot;..&quot;) {
					continue;
				} elseif (is_dir($parent . '/' . $file)) {
					rchmod($parent . '/' . $file, $dmod, $fmod);
				} else {
					$old = umask(0000);
					chmod($parent . '/' . $file, $fmod);
					umask($old);
				}
			}
			closedir($handle);
		}
	} else {
		$old = umask(0000);
		chmod($parent, $fmod);
		umask($old);
	}
}
rchmod('NOMBRE_CARPETA/', 0777, 0666);
?&gt;
</pre>
<p>Copiamos el código y sólo tenemos que modificar la línea 27, cambiando NOMBRE_CARPETA por el nombre de la carpeta que vamos a borrar, lo guardamos como loquesea<strong>.php</strong> al FTP, en el directorio que tenemos la carpeta que queremos borrar.</p>
<p>Una vez subido, vamos al archivo vía web: <span style="text-decoration: underline;">http://miweb.com/archivos/loquesea.php</span></p>
<p>Si todo ha ido bien la página se queda en blanco (doy voy hecho que irá bien <img src='http://blog.pdropablo.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ), seguidamente vamos al cliente FTP, Explorador o cPanel, y eliminamos la carpeta, la cuál se borrará sin ningún problema <img src='http://blog.pdropablo.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Espero que os funcione como me ha funcionado a mí, comentarme que tal os ha ido <img src='http://blog.pdropablo.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pdropablo.net/2010/01/ftp-error-550-la-solucion.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
