How to set default file permissions for all folders/files in a directory shared through sshfs?

There are two mechanisms, but they are not equivalent.

The first mechanism is by changing your umask, but I wouldn’t recommend this, given that you’re aiming for world-writable permissions. See… :arrow_down:

… and… :arrow_down:

man umask

The second (and better) method — possibly in conjunction with temporarily changing your umask — is by setting the SGID flag on the directory. This too is explained in the above-linked tutorial.

That all said, the better way to handle the permissions is to, instead of using sshfs for sharing a directory, set up NFS instead. That way you can fine-tune the permissions without having to make the share world-writable. :arrow_down:

NFS at the Arch Wiki