Can't execute scripts in ubuntu 8.10

Bug #301917 reported by dugrands
8
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Hello,
I have just installed ubuntu 8.10 and I can't execute scripts via ./script. It says, "-bash: /path/to/script no such file or directory."
However, I have verified that the scripts are there even with 777 permissions. I have even downloaded some different scripts and in different directories to no avail.
Any idea as what it could be?
Thanks.

Revision history for this message
Jordan Bain (jbain-deactivatedaccount) wrote :

It could be quite a few things. Perhaps symbolic links going nowhere? Could you maybe ls -al the directory the scripts are in post the output?

Changed in bash:
status: New → Incomplete
Revision history for this message
dugrands (kanjesam) wrote :

 the script is not a link and doing cat even shows the unreadable binary code.

Revision history for this message
Selecter (selecter) wrote :

I have the same problem. I installed ubuntu 8.10 in vmware fusion... At first I thought it's because of XFS filesystem (which I installed to experement) but then copied the file to /boot partition where reiserfs is installed.
anton@ubuntu:/boot$ ./server103_linux32.bin
bash: ./server103_linux32.bin: No such file or directory
anton@ubuntu:/boot$ ls -l | grep server103_linux32.bin
-rwxrwxrwx 1 root root 784532902 2008-12-18 22:02 server103_linux32.bin
anton@ubuntu:/boot$ cat /etc/fstab
proc /proc proc defaults 0 0
# /dev/sda3
UUID=b414bbf4-3b97-44a3-945b-70113eba6896 / xfs relatime 0 1
# /dev/sda2
UUID=a06a709e-aed4-4a7f-b45e-4060144d6424 /boot reiserfs notail,relatime 0 2
# /dev/sda1
UUID=83bda146-4afa-498c-97e6-f53a93b37d4d none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
# Beginning of the block added by the VMware software
.host:/ /mnt/hgfs vmhgfs defaults,ttl=5 0 0
# End of the block added by the VMware software

Revision history for this message
Selecter (selecter) wrote :

One addition: I installed ubuntu 8.10 server x86_64

Revision history for this message
Selecter (selecter) wrote :

Installing ia32-libs helped.

Revision history for this message
Louis (louisgag) wrote :

seems like "no such file or directory" can sometimes mean "this is a 32 bit app and your system is 64"

Thanks selecter, the package you suggested solved my problem!

sudo apt-get install ia32-libs

Revision history for this message
Grimm (dmalcolm) wrote :

Can confirm this problem. Running 8.10 32-bit. During Oracle installation found that the runInstaller script gave the error:

"bash: ./runInstaller: /bin/bash: bad interpreter: Permission denied". Checked and found that the new userid oracle created for this installation could not execute any scripts. Example (owned by oracle user):

#!/bin/bash
echo "Hello\n";

Accounts created prior to 8.10 execute this without problems; new accounts running the same script file
give the error above. Have tried copying .bashrc and .profile from older account, no change. Both accounts have bash as the default interpreter. From passwd file (name changed):

fred:x:1000:1000:Fred Bloggs,,,:/home/fred:/bin/bash
oracle:x:1001:1001:Oracle,,,:/home/oracle:/bin/bash

Tried changing default group for oracle user from oinstall to oracle - no change.

Tried adding oracle to sudoers and calling indirectly:

oracle@arwen:/mnt/barracuda_other/database$ sudo ./test.sh
sudo: unable to execute ./test.sh: Permission denied
oracle@arwen:/mnt/barracuda_other/database$ ls -lh test.sh
-rwxrwxrwx 1 oracle oinstall 28 2009-01-23 19:12 test.sh
# bash is functional
oracle@arwen:/mnt/barracuda_other/database$ /bin/bash
oracle@arwen:/mnt/barracuda_other/database$ cat test.sh
#!/bin/bash
echo "Hello\n";

I can probably work around the Oracle installation problem by reusing an older account, but is anyone else
seeing this behaviour? Any suggestions appreciated

Revision history for this message
Grimm (dmalcolm) wrote :

Sorry - scratch this one - dumb mistake. Found the partition was mounted noexec

Revision history for this message
Jordan Bain (jbain-deactivatedaccount) wrote :

Looks like it's resolved, marking as invalid.

Changed in bash (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.