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…

Scribus to PDF Print

Just using Scribus to design and print some lapel cards Regarding Scribus - It seems that the stable version will not...

Advanced git

https://youtu.be/duqBHik7nRo Just putting this here for later. A git talk that covers everything that I wonder about...