If I create a folder in php with mkdir() it has the www-data : www-data user and 755 permissions.
The problem is I can\'t delete this folder with the ftp-user (zapbe
In order to remove a directory, you need to have write permissions on the parent directory, not on the one you want to remove. In order to provide write access on the parent, a good approach would be to make that parent owned by some group that both www-data and your ftp user are members of, and never use the 777 permissioning. Also, make sure your parent folder does not have the sticky bit set.