Gallery 2 – Returning to Secure Permissions

Written by James McDonald

July 8, 2008

When you perform a module update with Gallery 2 it recommends changing the permissions of the modules and themes directories to rwxrwxrwx or 777:

cd $gallery_web_root # on Fedora this is probably /usr/share/gallery2
chmod -R 777 modules/ themes/

To get back to a secure setup I use the following:

cd $gallery_web_root
chown -Rv root.root modules/ themes/

find all directorys under themes/ and then change them to be rwxr_xr_x
find themes/ -type d | xargs chmod -v 755 {}\;

find all files under themes/ and then change them to be rw_r__r__
find themes/ -type f | xargs chmod -v 644 {}\;


Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…