Session negotiation failed, ownership of session directories cannot be changed

Forum / NoMachine for Linux / Session negotiation failed, ownership of session directories cannot be changed

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #34531
    dannysuls
    Participant

    I have been using NoMachine just fine on my Linux desktop for more than a year now.

    Recently, I got a new Ubuntu 20.04 setup on my desktop, but I cannot get NoMachine to work on it. I always get a session negation failed message: Cannot create session directory / operation not permitted.

    However, when I check the home drive on the desktop (NoMachine server), I see that the directory is actually created. However, in the nxerror.log file I additionally see the message:

    “File: WARNING! Can’t change ownership of <session directory>

    File: WARNING! Error is 1, Operation not permitted.”

    So to me it looks like the session directory can be created, but the ownership cannot be changed, causing this error.

    There is one significant difference related to my home drive in the new setup compared to the old setup: in the old setup (that worked previously) my home drive is simply an NFS3 mount without any additional security measures in place (besides regular LDAP authentication).
    In my new setup, my home drive additionally has Kerberos authentication for additional security. To me it feels like this is blocking the change of ownership of the session directory.

    Can anybody help me get this solved?

    One more question: as a workaround, I tried setting the “UserHome” parameter from my server.cfg to a local directory on the hard drive, but that doesn’t seem to work: NoMachine still tries to create the session directory on my “real” home drive on the network mount. Rebooting doesn’t change this. Any idea what could be going wrong here?

     

    #34544
    dannysuls
    Participant

    Some additional information:
    I’m using the latest version (7.6.2) of NoMachine on the server and client.

    These are the mount option of my “old” home drive (that didn’t have this session directory issue):
    type nfs (rw,relatime,vers=3,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=x.x.x.x,mountvers=3,mountport=2049,mountproto=udp,local_lock=none,addr=x.x.x.x)

    These are the mount options of my new home drive which has this session directory creation issue:
    type nfs4 (rw,relatime,vers=4.1,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=krb5,clientaddr=x.x.x.x,local_lock=none,addr=x.x.x.x)

    So I’m assuming it’s the “sec=krb5” option that’s giving problems, but I’m not sure.

    And I’d still like to know why this “UserHome” override in server.cfg is not working…

    #34574
    kroy
    Contributor

    Hi.

    UserHome applies only to newly created users. For existing users, /usr/NX/etc/node.cfg key with correct path must be set:

    UserNXDirectoryPath “”

    #34898
    dannysuls
    Participant

    Thank you for this information, after setting the variable UserNXDirectoryPath to a local drive it works again for me!

     

Viewing 4 posts - 1 through 4 (of 4 total)

This topic was marked as solved, you can't post.