On 29 January 2015 at 09:04, Giacomo Tesio <giacomo@tesio.it> wrote:

What's the meaning of qids? I see that responses often include them but request messages do not.

    see intro(5) or intro(9P) depending on system. They identify a file on a server; they are a value provided by the server to the client,
    so they only appear in replies. 

What's the proper message sequence to delete a file? And to delete a non empty directly?

    You point a fid at the file, then remove it:    Twalk* ... Tremove
    A non-empty directory can't be removed.
    Tremove implies Tclunk

Is it possible to move a file between different directories atomically?

    No. 

I can't find details on the file execution permission: looks like a malicious client could just ignore it on files and execute anything that it can read (obviously I'm just talking about single files,  not directory).

    It's not malicious, just incorrect. Obviously you can't execute a remote image or script unless you read it.
    The existing servers treat OEXEC as opening for read, with a check of the X permission.
    A directory, however, can't be opened OEXEC.
    In the script case, the file server will allow the OEXEC open, but #!interpreter is converted to {interpreter file},
    and then if the file is x-only, the subsequent open for OREAD will fail. Possibly the interpreters should open OEXEC, but they don't.

When I should clunk the afid?

    When the client closes it.

What about encryption? Is it completely delegated to the transport layer? 

     Yes, for encryption of communication.  A file server could encrypt files or the whole storage structure.