Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Maybe someone here would be able to help me out. Have installed Ubuntu 12.04 LTS (kubuntu) on two machines. The .bashrc and .bash_profile files are identical as the file structures on each machine is the same.

On machine 1: I run bash scripts within a terminal window with the simple: ./scriptname.sh

On machine 2: I cannot do this and must use: sh scriptname.sh Nor can I use ./ and tab-complete the script filename.

All executable bits are set correctly, all files and folders have the correct permissions. In the header of the scripts the shebang is set correctly.

Any ideas why this would be occurring?

When I try ls -l, I get:

-rwxrwxrwx 1 adelie adelie 351 Nov 4 20:32 file_motion_grab.sh

Output of getfacl is:

# file: file_motion_grab.sh
# owner: adelie
# group: adelie
user::rwx
group::rwx
other::rwx

More general - any new script on the second machine must be invoked with: sh scriptname.sh Something probably wrong in the .bash files. But not sure where to look.

EDIT

Yep parent directory is all set correctly.

share|improve this question
    
also asked on askubuntu and stackoverflow –  glenn jackman Nov 5 '12 at 1:50
    
are you sure you have exec permission on the PARENT directory? –  guido Nov 5 '12 at 2:27
    
@guido yep - parent directory is all set correctly. –  adeliefan Nov 5 '12 at 2:45
    
Don't crosspost. Still open on AU and SO; closing here –  Michael Mrozek Nov 5 '12 at 3:01
add comment

closed as too localized by Michael Mrozek Nov 5 '12 at 3:01

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.