The thing you are asking would let a user delete the directories/files of other users.
Anyway it is done by setting 'umask' to value which lets this.
And you set the umask before the user creates a file/directory. You have to make/ensure that a user gets this value.