Install script error

Forums / NoMachine for Linux / Install script error

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #35443
    dkebler
    Participant

    Your install script throws an error when the directory executable bit is sticky which is the case in the new elementary Odin 6 OS.  I don’t know why they set the sticky bit most everywhere but they did.

    you need to change your script to accommodate a sticky bit s on directories ortherwise the script fails (same script used in deb file).

    For the time being, I used the tarball and changed this and got it installed

    “It seems that you are trying to install this package in a directory without proper permissions. Please try to install it in a different directory or change permissions. The installation directory should have at least 555 permissions set.”

    #35461
    fisherman
    Moderator

    I am not sure exactly by your post what is the problem. I did tried installation on Elementary OS 6 and did not have any issues and installation completed without errors and NoMachine works without problems.

    Can it be the reason that you have some special configuration that somehow alters NoMachine installation.

    Please can you show us what error you had and send us the NoMachine logs that are stored in /usr/NX/var/log?

    #35468
    dkebler
    Participant

    This is not an issue specific to elementary or any os.  Because of the way you check for permission in your script if s bit is set over x then the script fails even though s indicates executable as well.  It needs to check for either is all.   You can’t assume it will only be x.  (line 4010)

    if [ $(“${ECHOCOMMAND}” “${dirperms:4:1}”) != “r” ] || \
    [ $(“${ECHOCOMMAND}” “${dirperms:6:1}”) != “x” ] || \
    [ $(“${ECHOCOMMAND}” “${dirperms:7:1}”) != “r” ] || \
    [ $(“${ECHOCOMMAND}” “${dirperms:9:1}”) != “x” ]
    then
    printMsg “It seems that you are trying to install this package in a directory without proper permissions. Please try to install it in a different” 0
    printMsg “directory or change permissions. The installation directory should” 0
    printMsg “have at least 555 permissions set.” 0

    exit 1
    fi

    like this

    [ $(“${ECHOCOMMAND}” “${dirperms:4:1}”) != “r” ] || \
    ! ( [ $(“${ECHOCOMMAND}” “${dirperms:6:1}”) = “x” && [ $(“${ECHOCOMMAND}” “${dirperms:6:1}”) != “s” ]) || \
    [ $(“${ECHOCOMMAND}” “${dirperms:7:1}”) != “r” ] || \
    ! ( [ $(“${ECHOCOMMAND}” “${dirperms:9:1}”) = “x” && [ $(“${ECHOCOMMAND}” “${dirperms:9:1}”) != “s” ])

    also you might consider using stat like so instead of checking directly for x/s/r

    stat -c ‘%a’   <directory or file>

    https://www.howtogeek.com/656646/how-to-use-suid-sgid-and-sticky-bits-on-linux/

     

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

You must be logged in to reply to this topic.