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 {}\;

0 Comments

Submit a Comment

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

You May Also Like…

Adding BCC to Divi Contact Form

The Divi contact form allows you to send to multiple email addresses by opening the properties of the form and...