Why wordpress cannot write to directory and how to fix it?

To fix this issue: Set WordPress directory and file permissions to allow your webserver’s user account execute+read+write access. (Typically this means setting permissions 0775 for directories and 0664 for files.)

However, I don’t quite understand about ownership.

I’d recommend a review of Understanding Linux File Permissions at Linux.com – it never hurts to know what’s going on at the system level.

The owners of the file is 1001?

Who the hell is 1001?

1001 is the first “userland” user created on the system (system-level users typically have ID’s in the 0-1000 range).

In this case, the user entry may be missing from /etc/passwd or Filezilla doesn’t have read access to /etc/passwd to display the username associated with UID 1001.

Ensure that /etc/passwd has 0644 permissions (owner read+write, group and global read) and an entry for 1001 exists or contact your hosting provider for assistance.