I hope you take something away...

If you do please leave something for me :)

Permission persistance for new files for a particular users

Story: Setting permission for directory for a particular user

Usually what we do when we want to give permission to folder (lets say our users name is abc for this example and directory name is test):

chown -R abc test

Problem: Does not set the permission to newly created files

Solution: setting the setgid bit so that any new file's (in test) owner is also user abc

sudo chmod -R u+s test

 

Programatically adding taxonomy terms as a Hierachy

Submitted by nmeegama on Fri, 09/05/2014 - 21:00

Problem

We can programatically add taxonomies, thats easy but adding it as a child term is the hard part

Solution

We need to fist create a validation function dedicated for the term reference filed 

$form[TAG_FIELD_NAME]['#element_validate'][] = 'taxonomy_field_tags_validate';