Guys, I have a strange problem on my Raspi2. I can start executables from a mounted SMB share without problems as a regular user. But every time I try to start an executable from that SMB share using "sudo" I get the message "command not found". I cant find the reason for this behavior. Maybe I miss something obvious but I think its strange. I tested the same thing on an x86-TC and on Ubuntu and it works fine there.
I am using this image "piCore-6.1beta1_v7-X.zip" and I have mounted an SMB-share using command:
mount -t cifs //ben/MASS2 /mnt/MASS2 -o user=me,password=secret,uid=1001,gid=50
Now there is the executable shell script "/mnt/MASS2/test.sh". As a normal user I can execute it and it gives the expected output:
tc@rasp_sz:~$ /mnt/MASS2/test.sh
works
Now the strange part: When I execute it using "sudo", then it claims it cannot find the executable:
tc@rasp_sz:~$ sudo /mnt/MASS2/test.sh
sudo: /mnt/MASS2/test.sh: command not found
Also when using sudo but changing to user "tc":
tc@rasp_sz:~$ sudo -u tc /mnt/MASS2/test.sh
sudo: /mnt/MASS2/test.sh: command not found
After copying test.sh from the SMB share to the local filesystem I can execute it without problems:
tc@rasp_sz:~$ sudo /mnt/MASS2/test.sh
sudo: /mnt/MASS2/test.sh: command not found
tc@rasp_sz:~$ cp /mnt/MASS2/test.sh /tmp/
tc@rasp_sz:~$ sudo /tmp/test.sh
works
This is the output of ls for MASS2:
tc@rasp_sz:~$ ls -la /mnt/MASS2/
total 1966102
drwxr-xr-x 2 tc staff 0 Dec 19 2012 $RECYCLE.BIN/
drwxr-xr-x 2 tc staff 8192 Apr 17 19:11 ./
drwxr-xr-x 5 root root 100 Apr 17 19:46 ../
drwxr-xr-x 2 tc staff 0 Apr 5 22:02 Audio/
drwxr-xr-x 2 tc staff 0 Jan 24 20:35 Backup/
drwxr-xr-x 2 tc staff 0 Dec 26 14:21 System Volume Information/
-rwxr-xr-x 1 tc staff 5632 Dec 21 2013 Thumbs.db
drwxr-xr-x 2 tc staff 0 Mar 12 16:50 VMs/
drwxr-xr-x 2 tc staff 0 Nov 23 12:00 Video/
drwxr-xr-x 2 tc staff 0 Apr 15 08:16 fhem-tc/
-rwxr-xr-x 1 tc staff 2343 Jan 21 00:48 mydata.tgz
drwxr-xr-x 2 tc staff 0 Apr 3 00:03 nginx/
-rwxr-xr-x 1 tc staff 27 Jan 1 1970 onboot.lst
-rwxr-xr-x 1 tc staff 2013265920 Apr 16 23:04 pagefile.sys
drwxr-xr-x 2 tc staff 0 Apr 17 18:24 rasp/
drwxr-xr-x 2 tc staff 0 Apr 17 19:11 rasp_sz/
-rwxr-xr-x 1 tc staff 188 Apr 5 14:26 regex.pl
drwxr-xr-x 2 tc staff 0 Nov 8 12:42 rips_ul/
-rwxr-xr-x 1 tc staff 13 Apr 17 21:32 test.sh
drwxr-xr-x 2 tc staff 0 Mar 28 00:10 userWidgets/
I have these extensions loaded:
tc@rasp_sz:~$ cat /etc/sysconfig/tcedir/onboot.lst
openssh.tcz
zip.tcz
wireless-3.18.10_v7-piCore+.tcz
libiw.tcz
iw.tcz
wireless_tools.tcz
wpa_supplicant.tcz
firmware-ralinkwifi.tcz
filesystems-3.18.10_v7-piCore+.tcz
libusb-compat.tcz
mc.tcz
Any idea what I can do? Thanks! Do you need any additional information?