Cperello/fix samba permissions

Bunch of fixes related with Samba permissions.

Remaining issues to be finished today:

- Recursive set of permissions.
- Fix a bug when setting permissions so new files inherite the same permissions as parent folder.