30 Ago, 2009
Escrito por: leopoldomaestro En: Cpanel|Linux
for usuarios in `/bin/ls /var/cpanel/users`; do chown -R ${user}:${user} /home/${user}/public_html chmod 755 /home/${user}/public_html find /home/${user}/public_html -name “*.php” -exec chmod 644 {} \; find /home/${user}/public_html -type d -exec chmod 755 {} \;
30 Ago, 2009
Escrito por: leopoldomaestro En: Cpanel|Linux
#!/bin/bash ahora=`date ‘+%Y%m’%d` backup=”backup/cpbackup” ## carpeta de backup retencion=”backup/retencion” ## carpeta de backup mv -f “/$backup”/daily /”$retencion”/$ahora mkdir “/$backup”/daily cp -al /”$retencion”/$ahora/* /”$backup”/daily/ cd /”$retencion”/ for backup in *; do limite=`date ‘+%Y%m’%d –date ‘7 dias’`; if [ “$backup” != “daily” ] && [ “$backup” -lt “$limite” ];then rm -rf “$backup”; fi; done