Issue to execute file on CIFS share

  • Hi,


    I can't execute some files on my CIFS share. I see there is no X permission for the user but I don't know why.
    I upload image to show it.
    vcredist_x64 has no execution right.
    I download it from my windows workstatio nand paste it here. I did same for iso file but they have x permission for users group.


    Where I have to check ?


    PS : I don't know really well linux. Please give me the command I have to do if you want some more informations.

    • Offizieller Beitrag

    Typically shares are mounted with noexec. This is to ensure that files cannot execute. This is for safety purposes.


    If you need to run files, install them first. Put them in a folder that doesn't have noexec set. Perhaps ~/bin, /usr/local/bin or /opt/bin. And make sure the folder is in the path and that the file has x set. Then you can run the file.


    This is part of why you rarely need anti-virus software on Linux boxes.


    If you want to run a script, you can do that by running (for instance) bash with the script as a parameter.

  • @cabrio
    Thanks for your answer. I think it's the good way to solve the issue.
    I add this option : acl allow execute always = yes
    on my smb share properties but the issue persists. I try to copy new file and no execute right is existing.


    @Adoby
    I think you read too fast my post. Issue is with windows access on SMB.
    It's to execute .exe , powershell script, ...

  • There are two parts to this. The drive that holds the file you wish to execute must be mounted with exec capability and the file you wish to execute must have its executable bit set for the applicable user/group/others.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • @matteu: The screenshot in post #1 shows that the executable bit is not set on the .exe file. This should be changed also.

    OMV 3.0.100 (Gray style)

    ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1) - Fractal Design Node 304 -

    3x WD80EMAZ Snapraid / MergerFS-pool via eSATA - 4-Bay ICYCube MB561U3S-4S with fan-mod

  • Because I'm not linux user.
    I use OMV only as NAS and all my network computer are windows.
    When I want to install software, I don't want to locally copy it to execute it. I want to execute it directly remotly.
    Is it possible without modify on each file +x or on the root share +x ?

    • Offizieller Beitrag

    No. It is not possible. By default Linux files are not executable. You have to make them executable. You have to do stuff to the file, the filesystem and the user account. Sorry.


    And it is a verrry Bad™ thing to do by default indiscriminately to all files in a whole shared filesystem. In my opinion.


    And OMV by design make it extra special difficult to do to files in shared folders. So you probably shouldn't do it.1

  • When I want to install software, I don't want to locally copy it to execute it. I want to execute it directly remotly.

    I can understand this request. In the past I had this request too.


    Is it possible without modify on each file +x or on the root share +x ?

    To change the executable bit is really not necessary. I tried it recently by adding acl allow execute always = yes to the SMB / CIFS -> settings - advanced settings -> extra options field. I didn´t modify the specific share settings.
    After saving the change I was able to execute .exe-Files on the Samba share. I tried it from a Windows 7 client.


    The executable bit of that file was not set.

    OMV 3.0.100 (Gray style)

    ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1) - Fractal Design Node 304 -

    3x WD80EMAZ Snapraid / MergerFS-pool via eSATA - 4-Bay ICYCube MB561U3S-4S with fan-mod

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!