Link to home
Start Free TrialLog in
Avatar of Katy Computer
Katy Computer

asked on

how do I run executable programs from network share?

I have mapped \\fs1\vol1 to drive w:

In Windows 8.1 & Server 2012R2, if I try executing program directly from the network via w:\prog\program.exe I get "Access is denied"

I can run the program from Windows Explorer, however I want to be able to run programs via batch file.

I am looking for a Registry Entry or command to allow this to work.

I am primarily interested in running executable programs, however I find it interesting to note that I cannot do a "start w:\1.txt" in Windows 7, start w:\1.txt would open the text file in notepad.
Avatar of McKnife
McKnife
Flag of Germany image

I can only guess, as this works in 8 with default Settings as it did in 7...
Do you start that command Shell elevated? Because an elevated shell will not have access to the same Network drives as the user has.
Avatar of Katy Computer
Katy Computer

ASKER

Elevated & non-elevated users have the same drive mappings, I have implemented following on all my machines:
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /f /v EnableLinkedConnections /t REG_DWORD /d 1
Now that is fine... but is that the problem, do you use the command Shell elevated here? That was what I tried to find out.
Same issue from elevated or un-elevated shell.
ASKER CERTIFIED SOLUTION
Avatar of McKnife
McKnife
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Not sure why it hasn't come up before now, but it turns out in order to prevent this behavior on a Samba share, the execute bit needs to be set. After running chmod -R 0770 /samba/vol1/ on the server, I edited smb.conf's service definition to look like this:
[vol1]
path = /samba/vol1
valid users = @smbgrp
write list = @smbgrp
guest ok = no
writable = yes
browsable = yes
inherit permissions = yes
directory mask = 0775
create mode = 0770

I am still having a curious problem with permissions, specifically, when I create or copy a file to the server the group execute bit isn't being set, so if I run "echo hello world > 3.txt" from a dos prompt, Samba isn't setting group execute: -rwxrw----. 1 john john   13 Aug  7 06:50 3.txt

This problem is for another thread. You have solved my problem. Thank you.
A samba share... now that is something worth mentioning the next time :)
Thanks for your help. Looks like I am going to need to do some permissions homework. inherit permissions = no solves the problem, but I suspect it is an incomplete answer.