Maiux Consulenza Informatica – Roma Assistenza per computer, connessioni ad internet e reti locali. Realizzazione e gestione siti web

Quick permissions management for NextGEN using CPanel hosting

Posted on maggio 22, 2011

NextGEN is a WordPress plugin that allows pictures gallery management. It has many features, included thumbnail generation. Usually the thumbnails get "nobody" user ownership and are writeable from the Apache process: this makes your website more vulnerable.

These are two bash scripts I wrote to relax permissions of directories or fix permissions and ownership of directories and thumbnails in galleries managed by NextGEN.

The first one relaxes the permissions on directories, so you can manage the gallery adding and removing images, editing them (i.e. watermarking) and creating thumbnails.

The second one fixes the ownership on eventually created thumbnails and resets the permissions on directories and files enforcing security.

You can use them if you got a shell access to your hosting server.

WARNING: they are in beta stage and may not work with another configuration, or potentially cause data loss. So review carefully before running them 😉

Enjoy!

relax_permissions.sh

#!/bin/bash
#
# script to relax permissions to make possible thumbnail creation on NextGEN gallery (WordPress plugin)
#
# by maiux (2011) - development@maiux.com
#
# DISCLAIMER: USE AT YOUR OWN RISK, I'M NOT RESPONSIBLE OF ANY DATA LOSS: THIS IS A BETA SCRIPT
#
#
FIND_DIRS=$(find * -type d -maxdepth 0)

echo "Relaxing directory permissions (0777, rwxrwxrwx)..."
find $FIND_DIRS -type d -exec chmod 0777 {} \;

echo "Relaxing file permissions (0666, rw-rw-rw-)..."
find $FIND_DIRS -type f -exec chmod 0666 {} \;     

echo "If you didn't see any error message, job is done"

fix_ownership_and_permissions.sh

#!/bin/bash
#
# script to fix ownership and permissions after thumbnail creation on NextGEN gallery (WordPress plugin)
#
# by maiux (2011) - development@maiux.com
#
# DISCLAIMER: USE AT YOUR OWN RISK, I'M NOT RESPONSIBLE OF ANY DATA LOSS: THIS IS A BETA SCRIPT
#
#
FIND_DIRS=$(find * -type d -maxdepth 0)

echo Fixing thumbnails ownership...
find $FIND_DIRS -user nobody -name "thumbs_*" -print -exec gzip {} \; -exec gunzip {}.gz \;

echo "Fixing file permissions (0644, rw-r--r--)..."
find $FIND_DIRS -type f -exec chmod 0644 {} \;     

echo "Fixing directory permissions (0755, rwxr-xr-x)..."
find $FIND_DIRS -type d -exec chmod 0755 {} \;

echo "If you didn't see any error message, job is done"
Inserito in: NextGEN Comments Off

Ajax To Do for WordPress

Posted on gennaio 29, 2010

Go to English translation

Ajax To Do è un plugin per WordPress che permette agli amministratori smemorati di tener traccia delle cose importanti da fare.

Aggiunge un widget alla dashboard di WordPress in cui si possono inserire le cose da fare. Questa è un'immagine di come appare il plugin:

AjaxToDo for WordPress screenshot

Il plugin è disponibile qui: Ajax To Do plugin for WordPress

Per commenti o informazioni scrivere a: development@maiux.com

English

Ajax To Do is a WordPress plugin for administrators, using it you can remeber important task to do.

It adds a widget to the wordpress dashboard in which you can track relevant tasks.

You can get it here: Ajax To Do plugin for WordPress

For further informations or comments write to: development@maiux.com