Issue to execute file on CIFS share

    • OMV 4.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • 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.
      Images
      • 2019-10-03_10h37_43.png

        56.02 kB, 917×106, viewed 9 times
    • 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.
      OMV 4: 7 x Odroid HC2 + 1 x HC1 + 2 x RPi4
    • @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 4.x - ASRock Rack C2550D4I - 16GB ECC - Silverstone DS380
    • I change this (on attachment).
      If I try to copy + paste new file from my computer to this share, it doesn't have bit execute set.
      Is it not possible to set the bit automatically ?
      I would like all my file can be executed.
      Images
      • 2019-10-03_13h11_00.png

        109.84 kB, 1,042×528, viewed 9 times
    • 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 ?
    • 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
      OMV 4: 7 x Odroid HC2 + 1 x HC1 + 2 x RPi4
    • matteu wrote:

      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.

      matteu wrote:

      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.99 (Gray style)
      ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1)- Fractal Design Node 304