0

I would like to implement some external code in my custom module and if I understand correctly (correct me if I'm wrong), you can drop those folders in both sites/all/libraries as well as in sites/all/modules/custom/myModule/libraries.

What would the better security-wise place to include the folder be?

If you can think of another reason why to place it in the first folder or the second, I'm happy to hear it.

2

If your web server is set up correctly then both of the paths you've mentioned will have the same permissions (readable but not writeable by the server), so they would be equally secure/insecure depending on the rest of your server setup.

I must admit I haven't come across a path like the second one you mention, although I know most contributed modules that have been updated to Drupal 7 use the sites/all/libraries folder for storing external code libraries.

  • Ok, great thanks! You only confirmed what I already thought. Thanks! – Michiel Mar 27 '12 at 12:51
  • i recently heard that a custom folder in modules is quite common ;) – rémy Mar 27 '12 at 12:57
  • @rémy I meant the /libraries part of the path...I haven't seen that inside a contrib/custom module folder before :) – Clive Mar 27 '12 at 13:01
  • true .. was reading to fast - sorry – rémy Mar 27 '12 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.