Jump to content

Gallery 2: Location Of G2data Folder?


Recommended Posts

Hi -


I'm about to upgrade my Gallery2 installation, and I'm a little confused about where I'm supposed to put my Gallery directories, and what permissions I'm supposed to set for them. The instructions for installing Gallery2 state the following:


Create a directory for gallery to store photos. This must be writeable by the web server, but for security reasons we suggest that you do not put it in the web root. If you put it in the web root, then anybody can get directly to your images with their web browser which circumvents Gallery 2’s security.


Unix Example

$ cd $HOME

$ mkdir g2data

$ chmod 777 g2data


Windows Example

C:\> mkdir g2data


In the Unix example, you may note that modes of 777 on your g2data directory are not all that secure. However, making it more secure depends on how your system is configured. Talk with your system administrator about ways to change the permissions on that directory to make it so that Gallery can still write to the files but that others can’t.


Are they saying I shouldn't have my g2data folder in the same directory as my blog? (i.e., public_html/) Does this mean I should install my g2data into /g2data instead of /public_html/g2data? And isn't 777 really dangerous in terms of security?


Based on instructions, this is where I've placed my Gallery2 directories:

g2data folder --> /

The folder that I upload my Gallery photos into --> /uploaded_images

Gallery2 installation --> /public_html/gallery2


Is this correct? Please advise - I'm feeling kinda confused right now.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...