I am new to Cygwin, ssh, and messing with file permissions and have a problem. On computer WORKER1, I am attempting to ssh into computer WORKER2 and then running a .sh file on WORKER1 from there. From what I can tell from the below output, ls -l shows that there should be permission to do everything (I know that those are bad permissions to have, but I was going mad trying to figure out why I was getting this permission error).
root@Worker1 ~
$ ssh WORKER2
Last login: Tue Jan 31 10:51:54 2012 from worker1
root@Worker2 ~
$ cd //WORKER1/Users/Public/pMatlab/MatlabMPI/Examples/MatMPI
root@Worker2 //WORKER1/Users/Public/pMatlab/MatlabMPI/Examples/MatMPI
$ sh Dos_Commands.WORKER2.1.sh
sh: Dos_Commands.WORKER2.1.sh: Permission denied
root@Worker2 //WORKER1/Users/Public/pMatlab/MatlabMPI/Examples/MatMPI
$ ls -l
total 28
-rwxrwxrwx+ 1 Administrators None 2 Jan 31 11:01 Dos_Commands.WORKER1.0
-rwxrwxrwx+ 1 Administrators None 127 Jan 31 11:01 Dos_Commands.WORKER2.1
-rwxrwxrwx+ 1 Administrators None 250 Jan 31 11:01 Dos_Commands.bat
-rwxrwxrwx+ 1 Administrators None 636 Jan 31 11:01 MPI_COMM_WORLD.mat
-rwxrwxrwx+ 1 Administrators None 97 Jan 31 11:01 MatMPIdefs1.m
-rwxrwxrwx+ 1 Administrators None 199 Jan 31 11:01 p0_p0_t10000_buffer.ma
-rwxrwxrwx+ 1 Administrators None 199 Jan 31 11:01 p0_p1_t10000_buffer.ma
-rwxrwxrwx+ 1 Administrators None 0 Jan 31 11:01 p0_p1_t10000_lock.mat
Both computers are running Windows 7 64 bit, and I am running the latest version of Cygwin and OpenSSH on each. The sshd running on WORKER2 is also the one from Cygwin. When installing sshd, the only way I was able to get it to properly function was to answer 'no' to privilege separation and 'yes' to installing as a service when running ssh-host-config. I'm using public key RSA authentication. I've tried mounting //WORKER1/Users/Public/pMatlab/ as a network drive and accessing it that way, but that did not help either. Any ideas of what might be going wrong? Thanks!
EDIT: I forgot to mention that my network sharing settings in Windows are set to allow everything from what I can see. Furthermore, my Public folder and folders within it all seem to be set to read-only (in the right click->Properties menu), though the files within it are not. Attempting to change this in the Properties menu does nothing - when I turn read-only off it is just back on again when I reopen the Properties menu. I tried changing this by running attrib -r C:\Users\Public in cmd.exe but that did not do anything either.
Finally, I do not get a permission denied error when running the .sh file locally, when I try to access it from the Windows GUI on computer WORKER2, or when I ssh from WORKER2 to itself and then try to access it. The permission error only appears when I ssh from WORKER1 to WORKER2 and then try to access the file on WORKER1 from there.
Final edit: Issue solved. It turned out that the folder was encrypted! No idea why. That's how it came out of the zip file for some reason.