[Gambas-user] Linux files question and very of gambas topic

ron ronstk at ...239...
Mon Mar 15 22:36:32 CET 2004


On Monday 15 March 2004 08:04, Laurent Godard wrote:
> Hi Ron,
>
> > The result is
> > bash: ./append.sh: /bin/sh: bad interpreter: Permission denied
>
> I don't know if tyour problem is solved, but did you check the
> permisions of your file ? Is it executable with the current user
> You may look at chmod fonction to make it executable
>
> chmod 777 ./append.sh
>
> As i'm a totally bneginner in unix environement, i may be wrong, though
>
> Laurent
Hi Laurent,

Yes I did set all the permissions as rwxrwxrwx and did it as root to be shure
I have had it once before in another script, it disapeared so the reason is 
unknown, for a cron job and it worked. 

It happens even with two lines, the #!/bin/sh and a # do i work line.

For other newbies:
Make a script named 'mydir' to show a directory in my home directory

  #!/bin/bash
  ls /

chmod 777 ./mydir
Try and it runs ok
move it to / and try, ok
move it to /tmp try, ok
move it to /data2 try, bad
Puzzling what is wrong???

And then I get the light, my data1 ... 4 are mounted partitions !
Open fstab and see
/dev/hda1            /data1             reiserfs   auto,user,rw           0 0
/dev/hda3            /data2             auto       auto,user,rw            0 0
/dev/hda7            /data3             reiserfs   auto,user,rw           0 1
/dev/hda8            /data4             reiserfs   auto,user,rw           0 0
As i'm right this tells me what is avialable on my system

Open mtab and see
/dev/hda1 /data1 reiserfs rw,noexec,nosuid,nodev 0 0
/devi/hda3 /data2 ext2     rw,noexec,nosuid,nodev 0 0
/dev/hda7 /data3 reiserfs rw,noexec,nosuid,nodev 0 0
/dev/hda8 /data4 reiserfs rw,noexec,nosuid,nodev 0 0

Aha 'noexec', that should be the problem.
umount not working

# umount -f /data2
umount2: Device or resource busy
umount: /dev/hda3: not mounted
umount: /data2: Illegal seek

# mount
/dev/hda1 on /data1 type reiserfs (rw,noexec,nosuid,nodev)
/dev/hda3 on /data2 type ext2        (rw,noexec,nosuid,nodev)
/dev/hda7 on /data3 type reiserfs (rw,noexec,nosuid,nodev)
/dev/hda8 on /data4 type reiserfs (rw,noexec,nosuid,nodev)

How do I remount /data2, the mount /data2 -remount, not working
mount /data2 -o exec, not working

I wil survive Ron




More information about the User mailing list