title: Meteor GridFS 403 forbidden
body: <p>Possible duplicate: <a href="https://stackoverflow.com/questions/23044259/meteor-collectionfs-insert-server-side">Meteor collectionfs insert server side</a></p>
  
  <p>I have multiple image collections using GridFS to store files. If I use "Images" as name for the collection everything works fine, but as soon as I change the name I'm getting <code>GET http://localhost:3000/cfs/files/PlayerImages/zo4Z7rnYLb32MLYkM/taylor.jpg 403 (Forbidden)</code></p>
  
  <p>(And for example, this one does work: <a href="http://localhost:3000/cfs/files/Images/7j9XAEebGctuivGhz/see-more.png" rel="nofollow noreferrer">http://localhost:3000/cfs/files/Images/7j9XAEebGctuivGhz/see-more.png</a>)</p>
  
  <p>This is how I defined my collections:</p>
  
  <pre><code>function createImageCollection(name,transform){
    var collectionName = name + 's';
    var storeName = name + 'Store';
    var options = {
      filter: {
        allow: {
          contentTypes: ['image/*'],
          extensions: ['png', 'PNG', 'jpg', 'JPG', 'jpeg', 'JPEG']
        }
      }
    };
  
    if (Meteor.isServer) {
      storeOptions = {
        path: process.env.PWD + "/public"
      };
      // only add the transform when graphicsmagick is available
      if(gm.isAvailable &amp;&amp; typeof transform === 'function'){
        storeOptions.transformWrite = transform;
      }
      options.stores = [new FS.Store.GridFS(storeName,storeOptions)];
    } else {
      options.stores = [new FS.Store.GridFS(storeName)];
    }
    return new FS.Collection(collectionName,options);
  }
  
  // and finally create them
  // THIS FIRST ONE WORKS JUST FINE
  Images = createImageCollection('Image',imageResizeTimeline); // default resize is timeline, nothing bigger then that?
  BackgroundImages = createImageCollection('BackgroundImage',imageResizeBackground);
  PlayerImages = createImageCollection('PlayerImage',imageResizePlayer);
  LogoImages = createImageCollection('LogoImage',imageResizeLogo);
  </code></pre>
  
  <p>And I also added allow/deny rules for each collection:</p>
  
  <pre><code>var ImagePermissions = {
      insert: function () {
          return true;
      },
      update: function () {
          return true;
      },
      download: function () {
          return true;
      },
      remove: function () {
          return false;
      },
      fetch: null
  };
  Images.allow(ImagePermissions);
  PlayerImages.allow(ImagePermissions);
  BackgroundImages.allow(ImagePermissions);
  LogoImages.allow(ImagePermissions);
  </code></pre>
  
  <p>On a sidenote, I am using autoform to generate forms, but I don't think the problem is located in there because "Images" works.</p>
  
  <p>Must I add this path to some "routing" or "config" files? Maybe "Images" is added by default? (This project is set-up by someone else, but I don't think I missed anything he did.)</p>