* [gentoo-user] Running Scripts
@ 2007-07-27 16:14 Greg Lindstrom
2007-07-27 17:04 ` Alex Schuster
` (3 more replies)
0 siblings, 4 replies; 27+ messages in thread
From: Greg Lindstrom @ 2007-07-27 16:14 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 684 bytes --]
Hello-
I am programming Python (2.4.1) scripts to run on our Gentoo boxes and am
having a bit of trouble I was hoping you could help me with. My file,
hello.py looks like this:
#!/usr/bin/python
print 'hello, python'
I add execute permission to the file and try to run it as follows:
myprompt $ ./hello.py
and get
-bash: ./hello.py: /usr/bin/env: bad interpreter: Permission denied
running /usr/bin/python brings up the python shell, so that's in place.
What am I missing to run these files (they run fine with I type in 'python'
before the filename). BTW, I have the same issue running Perl scripts which
is why I'm asking the question here.
Thanks for your help,
--greg
[-- Attachment #2: Type: text/html, Size: 789 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-27 16:14 [gentoo-user] Running Scripts Greg Lindstrom
@ 2007-07-27 17:04 ` Alex Schuster
2007-07-27 17:11 ` Boyd Stephen Smith Jr.
` (2 subsequent siblings)
3 siblings, 0 replies; 27+ messages in thread
From: Alex Schuster @ 2007-07-27 17:04 UTC (permalink / raw
To: gentoo-user
Greg Lindstrom writes:
> I am programming Python (2.4.1) scripts to run on our Gentoo boxes and
> am having a bit of trouble I was hoping you could help me with. My
> file, hello.py looks like this:
>
> #!/usr/bin/python
> print 'hello, python'
>
> I add execute permission to the file and try to run it as follows:
>
> myprompt $ ./hello.py
>
> and get
>
> -bash: ./hello.py: /usr/bin/env: bad interpreter: Permission denied
is is possible that you saved the text file in DOS format, with CR-LF
endings instead of LF only?
If "od -t x2 hello.py" shows 0a0d sequences, this is the case. You could
use dos2unix to convert.
Just guessing, but I sometimes got similar errors in such cases.
Alex
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-27 16:14 [gentoo-user] Running Scripts Greg Lindstrom
2007-07-27 17:04 ` Alex Schuster
@ 2007-07-27 17:11 ` Boyd Stephen Smith Jr.
2007-07-27 17:27 ` Uwe Thiem
2007-07-28 23:35 ` [gentoo-user] " Moshe Kamensky
3 siblings, 0 replies; 27+ messages in thread
From: Boyd Stephen Smith Jr. @ 2007-07-27 17:11 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 552 bytes --]
On Friday 27 July 2007, "Greg Lindstrom" <gslindstrom@gmail.com> wrote
about '[gentoo-user] Running Scripts':
> -bash: ./hello.py: /usr/bin/env: bad interpreter: Permission denied
> running /usr/bin/python brings up the python shell, so that's in place.
which env
ls -l /usr/bin/env
ls -l /usr/bin/python
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss03@volumehost.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.org/ \_/
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-27 16:14 [gentoo-user] Running Scripts Greg Lindstrom
2007-07-27 17:04 ` Alex Schuster
2007-07-27 17:11 ` Boyd Stephen Smith Jr.
@ 2007-07-27 17:27 ` Uwe Thiem
2007-07-27 18:13 ` Greg Lindstrom
2007-07-28 23:35 ` [gentoo-user] " Moshe Kamensky
3 siblings, 1 reply; 27+ messages in thread
From: Uwe Thiem @ 2007-07-27 17:27 UTC (permalink / raw
To: gentoo-user
On 27 July 2007, Greg Lindstrom wrote:
> Hello-
>
> I am programming Python (2.4.1) scripts to run on our Gentoo boxes and am
> having a bit of trouble I was hoping you could help me with. My file,
> hello.py looks like this:
>
> #!/usr/bin/python
> print 'hello, python'
>
> I add execute permission to the file and try to run it as follows:
>
> myprompt $ ./hello.py
>
> and get
>
> -bash: ./hello.py: /usr/bin/env: bad interpreter: Permission denied
>
> running /usr/bin/python brings up the python shell, so that's in place.
So the symlink from /usr/bin/python to the real binary is correct and the real
binary has the right permissions.
If your line starting with "#!/" weren't the first line in your script, you
would get a different error message. Same if the "#" weren't the first
character in that line.
This leads to the question whether you can start *any* executable from your
home directory (assuming you stored your script somewhere under your home
directory). If not so, do you mount your /home partition with the "noexec"
option?
Uwe
--
Jethro Tull: Maybe, I am not done yet!
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-27 17:27 ` Uwe Thiem
@ 2007-07-27 18:13 ` Greg Lindstrom
2007-07-27 18:47 ` Uwe Thiem
` (2 more replies)
0 siblings, 3 replies; 27+ messages in thread
From: Greg Lindstrom @ 2007-07-27 18:13 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1489 bytes --]
Wow! Thanks for the help. See my comments below pertaining to individual
remarks.
--greg
Alex asked:
> is is possible that you saved the text file in DOS format, with CR-LF
> endings instead of LF only?
>
> If "od -t x2 hello.py" shows 0a0d sequences, this is the case. You could
> use dos2unix to convert.
>
$ od -t x2 hello.py
0000000 2123 752f 7273 622f 6e69 652f 766e 7020
0000020 7479 6f68 0a6e 7270 6e69 2074 6827 6c65
0000040 6f6c 202c 6f77 6c72 2764 000a
0000053
Nope. That looks good.
Boyd Wrote:
which env
>
> ls -l /usr/bin/env
> ls -l /usr/bin/python
I'm not sure what you are asking here.
$ ls -l /usr/bin/env
lrwxrwxrwx 1 root root 8 May 18 2006 /usr/bin/env -> /bin/env
$ ls -l /usr/bin/python
lrwxrwxrwx 1 root root 9 May 18 2006 /usr/bin/python -> python2.4
Uwe Thiem <uwix@iway.na> wrote:
>
> This leads to the question whether you can start *any* executable from
> your
> home directory (assuming you stored your script somewhere under your home
> directory). If not so, do you mount your /home partition with the "noexec"
> option?
I have the same problem with Perl scripts; I haven't tried any others. Is
there a way to tell how the partition is mounted? I'm sorry to say that I
am a lowly user on the system and don't really know much about how it is set
up.
Thank-you so much for your attention. This is a small problem, as I can run
the scripts with python (or perl) then the filename. I'd just like to
understand what's happening.
--greg
[-- Attachment #2: Type: text/html, Size: 2379 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-27 18:13 ` Greg Lindstrom
@ 2007-07-27 18:47 ` Uwe Thiem
2007-07-27 19:04 ` Greg Lindstrom
2007-07-28 12:26 ` Kent Fredric
2007-07-29 12:20 ` David Relson
2 siblings, 1 reply; 27+ messages in thread
From: Uwe Thiem @ 2007-07-27 18:47 UTC (permalink / raw
To: gentoo-user
On 27 July 2007, Greg Lindstrom wrote:
> Uwe Thiem <uwix@iway.na> wrote:
> > This leads to the question whether you can start *any* executable from
> > your
> > home directory (assuming you stored your script somewhere under your home
> > directory). If not so, do you mount your /home partition with the
> > "noexec" option?
>
> I have the same problem with Perl scripts; I haven't tried any others. Is
> there a way to tell how the partition is mounted? I'm sorry to say that I
> am a lowly user on the system and don't really know much about how it is
> set up.
Post the content of your /etc/fstab. You should be able to do that as a
normal user.
Kinda funny: Writing this while listening to Queen's "Another One Bites The
Dust". ;-)
Uwe
--
Jethro Tull: Maybe, I am not done yet!
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-27 18:47 ` Uwe Thiem
@ 2007-07-27 19:04 ` Greg Lindstrom
2007-07-27 19:18 ` Eric Martin
` (2 more replies)
0 siblings, 3 replies; 27+ messages in thread
From: Greg Lindstrom @ 2007-07-27 19:04 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 224 bytes --]
On 7/27/07, Uwe Thiem <uwix@iway.na> wrote:
>
> Post the content of your /etc/fstab. You should be able to do that as a
> normal user.
Nope. I am denied access to /etc/fstab. Could this be (part of) the
problem?
--greg
[-- Attachment #2: Type: text/html, Size: 531 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-27 19:04 ` Greg Lindstrom
@ 2007-07-27 19:18 ` Eric Martin
2007-07-27 19:23 ` Florian Philipp
2007-07-27 20:38 ` Arturo 'Buanzo' Busleiman
2 siblings, 0 replies; 27+ messages in thread
From: Eric Martin @ 2007-07-27 19:18 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 342 bytes --]
what does ls -l /etc/fstab show?
On 7/27/07, Greg Lindstrom <gslindstrom@gmail.com> wrote:
>
>
>
> On 7/27/07, Uwe Thiem <uwix@iway.na> wrote:
> >
> > Post the content of your /etc/fstab. You should be able to do that as a
> > normal user.
>
>
> Nope. I am denied access to /etc/fstab. Could this be (part of) the
> problem?
> --greg
>
>
[-- Attachment #2: Type: text/html, Size: 997 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-27 19:04 ` Greg Lindstrom
2007-07-27 19:18 ` Eric Martin
@ 2007-07-27 19:23 ` Florian Philipp
2007-07-28 6:29 ` Dirk Heinrichs
2007-07-27 20:38 ` Arturo 'Buanzo' Busleiman
2 siblings, 1 reply; 27+ messages in thread
From: Florian Philipp @ 2007-07-27 19:23 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 361 bytes --]
Am Freitag 27 Juli 2007 21:04 schrieb Greg Lindstrom:
> On 7/27/07, Uwe Thiem <uwix@iway.na> wrote:
> > Post the content of your /etc/fstab. You should be able to do that as a
> > normal user.
>
> Nope. I am denied access to /etc/fstab. Could this be (part of) the
> problem?
> --greg
Please post the output of
cat /etc/group | grep $username
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-27 19:04 ` Greg Lindstrom
2007-07-27 19:18 ` Eric Martin
2007-07-27 19:23 ` Florian Philipp
@ 2007-07-27 20:38 ` Arturo 'Buanzo' Busleiman
2 siblings, 0 replies; 27+ messages in thread
From: Arturo 'Buanzo' Busleiman @ 2007-07-27 20:38 UTC (permalink / raw
To: gentoo-user
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Greg Lindstrom wrote:
> Nope. I am denied access to /etc/fstab. Could this be (part of) the
> problem?
Try sending us the output of the "mount" command.
- --
Arturo "Buanzo" Busleiman - Consultor Independiente en Seguridad Informatica
SHOW DE FUTURABANDA - Sabado 18 de Agosto 2007 (Speed King, Capital Federal)
Entradas anticipadas a traves de www.futurabanda.com.ar - Punk Rock Melodico
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGqleqAlpOsGhXcE0RCiefAJ9eiZgbRs04kJT0nf8y5ygDstD6HwCfYbLo
rrTgSnosMUavlvXP+ljyXZU=
=HgEt
-----END PGP SIGNATURE-----
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-27 19:23 ` Florian Philipp
@ 2007-07-28 6:29 ` Dirk Heinrichs
0 siblings, 0 replies; 27+ messages in thread
From: Dirk Heinrichs @ 2007-07-28 6:29 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 144 bytes --]
Am Freitag, 27. Juli 2007 schrieb Florian Philipp:
> Please post the output of
>
> cat /etc/group | grep $username
Or just: id
Bye...
Dirk
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-27 18:13 ` Greg Lindstrom
2007-07-27 18:47 ` Uwe Thiem
@ 2007-07-28 12:26 ` Kent Fredric
2007-07-28 14:33 ` Greg Lindstrom
2007-07-28 15:01 ` Uwe Thiem
2007-07-29 12:20 ` David Relson
2 siblings, 2 replies; 27+ messages in thread
From: Kent Fredric @ 2007-07-28 12:26 UTC (permalink / raw
To: gentoo-user
On 7/28/07, Greg Lindstrom <gslindstrom@gmail.com> wrote:
> Wow! Thanks for the help. See my comments below pertaining to individual
> remarks.
> --greg
>
> Alex asked:
> > is is possible that you saved the text file in DOS format, with CR-LF
> > endings instead of LF only?
> >
> > If "od -t x2 hello.py" shows 0a0d sequences, this is the case. You could
> > use dos2unix to convert.
> >
>
> $ od -t x2 hello.py
> 0000000 2123 752f 7273 622f 6e69 652f 766e 7020
> 0000020 7479 6f68 0a6e 7270 6e69 2074 6827 6c65
> 0000040 6f6c 202c 6f77 6c72 2764 000a
> 0000053
>
> Nope. That looks good.
>
> Boyd Wrote:
>
> > which env
> >
> > ls -l /usr/bin/env
> > ls -l /usr/bin/python
>
> I'm not sure what you are asking here.
>
> $ ls -l /usr/bin/env
> lrwxrwxrwx 1 root root 8 May 18 2006 /usr/bin/env -> /bin/env
>
> $ ls -l /usr/bin/python
> lrwxrwxrwx 1 root root 9 May 18 2006 /usr/bin/python -> python2.4
>
>
> Uwe Thiem < uwix@iway.na> wrote:
> > This leads to the question whether you can start *any* executable from
> your
> > home directory (assuming you stored your script somewhere under your home
> > directory). If not so, do you mount your /home partition with the "noexec"
> > option?
>
> I have the same problem with Perl scripts; I haven't tried any others. Is
> there a way to tell how the partition is mounted? I'm sorry to say that I
> am a lowly user on the system and don't really know much about how it is set
> up.
>
> Thank-you so much for your attention. This is a small problem, as I can run
> the scripts with python (or perl) then the filename. I'd just like to
> understand what's happening.
>
> --greg
>
>
try a plain old bash script and see if that works, and try this and
see if it works:
cat >> testrun.c
#include <stdio.h>
int main(int argc, int* argv)
{
printf("helloworld");
}
( press ctrl+d here )
make testrun
./testrun
if that fails to do ./testrun, then i figgure the FS your on isn't
execable. sorry. ^^
--
Kent
ruby -e '[1, 2, 4, 7, 0, 9, 5, 8, 3, 10, 11, 6, 12, 13].each{|x|
print "enNOSPicAMreil kdrtf@gma.com"[(2*x)..(2*x+1)]}'
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-28 12:26 ` Kent Fredric
@ 2007-07-28 14:33 ` Greg Lindstrom
2007-07-28 15:09 ` Uwe Thiem
2007-07-28 15:01 ` Uwe Thiem
1 sibling, 1 reply; 27+ messages in thread
From: Greg Lindstrom @ 2007-07-28 14:33 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1612 bytes --]
Eric Martin:
>what does ls -l /etc/fstab show?
$ ls -l /etc/fstab
-rw-r----- 1 root root 1434 Nov 29 2006 /etc/fstab
Florian Phillip:
>Please post the output of
>cat /etc/group | grep $username
Returns nothing. When I substitute my username (glindstrom) in it also
returns nothing.
Arthuro Buanzo:
> Try sending us the output of the "mount" command.
$ mount
/dev/sda2 on / type ext3 (rw,noatime,acl)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
udev on /dev type tmpfs (rw,nosuid)
devpts on /dev/pts type devpts (rw)
/dev/sda5 on /var type ext3 (rw,nodev,noatime)
/dev/sda6 on /usr type ext3 (rw,nodev,noatime,acl)
/dev/sda7 on /home type ext3 (rw,nosuid,nodev)
/dev/sda8 on /m01 type ext3 (rw,nosuid,nodev,noatime,acl)
none on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)
none on /tmp type tmpfs (rw,size=32M)
usbfs on /proc/bus/usb type usbfs (rw,devmode=0664,devgid=85)
//express/bender_departments on /mnt/depts type smbfs (0)
//express/bender_public on /mnt/public type smbfs (0)
//express/bender_everyone on /mnt/everyone type smbfs (0)
//express/edi_images on /mnt/edi_images type smbfs (0)
Dirk Heinrichs:
> Or just: id
$ id
uid=10002(glindstrom) gid=1000(people)
groups=1000(people),1002(cvs),1005(it),1022(p_it),1027(appdev)
Kent Fredric:
>try a plain old bash script and see if that works, and try this and
>see if it works:
$ ./testrun
-bash: ./testrun: Permission denied
<Sigh>. Thanks for all of your help, guys. It looks like I'm not set up to
execute sctripts in this manner. I'll continue to put "python" or "perl" in
front of them
Thanks again,
--greg
[-- Attachment #2: Type: text/html, Size: 2323 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-28 12:26 ` Kent Fredric
2007-07-28 14:33 ` Greg Lindstrom
@ 2007-07-28 15:01 ` Uwe Thiem
2007-07-28 16:20 ` Kent Fredric
` (2 more replies)
1 sibling, 3 replies; 27+ messages in thread
From: Uwe Thiem @ 2007-07-28 15:01 UTC (permalink / raw
To: gentoo-user
On 28 July 2007, Kent Fredric wrote:
> try a plain old bash script and see if that works, and try this and
> see if it works:
>
> cat >> testrun.c
> #include <stdio.h>
> int main(int argc, int* argv)
> {
> printf("helloworld");
> }
> ( press ctrl+d here )
>
> make testrun
Without writing a Makefile, make won't build the program. ;-)
You better try this:
gcc -o testrun testrun.c
Uwe
>
> ./testrun
>
> if that fails to do ./testrun, then i figgure the FS your on isn't
> execable. sorry. ^^
>
>
>
>
> --
> Kent
> ruby -e '[1, 2, 4, 7, 0, 9, 5, 8, 3, 10, 11, 6, 12, 13].each{|x|
> print "enNOSPicAMreil kdrtf@gma.com"[(2*x)..(2*x+1)]}'
--
Jethro Tull: Maybe, I am not done yet!
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-28 14:33 ` Greg Lindstrom
@ 2007-07-28 15:09 ` Uwe Thiem
2007-07-29 8:31 ` Alex Schuster
0 siblings, 1 reply; 27+ messages in thread
From: Uwe Thiem @ 2007-07-28 15:09 UTC (permalink / raw
To: gentoo-user
On 28 July 2007, Greg Lindstrom wrote:
> $ mount
> /dev/sda2 on / type ext3 (rw,noatime,acl)
> proc on /proc type proc (rw)
> sysfs on /sys type sysfs (rw)
> udev on /dev type tmpfs (rw,nosuid)
> devpts on /dev/pts type devpts (rw)
> /dev/sda5 on /var type ext3 (rw,nodev,noatime)
> /dev/sda6 on /usr type ext3 (rw,nodev,noatime,acl)
> /dev/sda7 on /home type ext3 (rw,nosuid,nodev)
Hm... sems my idea about /home being mounted with "noexec" doesn't hold.
I am out of ideas - and still a bit puzzled how /usr/bin/env got involved (see
original post).
Uwe
--
Jethro Tull: Maybe, I am not done yet!
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-28 15:01 ` Uwe Thiem
@ 2007-07-28 16:20 ` Kent Fredric
2007-07-28 16:27 ` Boyd Stephen Smith Jr.
2007-07-28 18:01 ` Arturo 'Buanzo' Busleiman
2007-07-28 18:03 ` Arturo 'Buanzo' Busleiman
2 siblings, 1 reply; 27+ messages in thread
From: Kent Fredric @ 2007-07-28 16:20 UTC (permalink / raw
To: gentoo-user
On 7/29/07, Uwe Thiem <uwix@iway.na> wrote:
> On 28 July 2007, Kent Fredric wrote:
>
> > try a plain old bash script and see if that works, and try this and
> > see if it works:
> >
> > cat >> testrun.c
> > #include <stdio.h>
> > int main(int argc, int* argv)
> > {
> > printf("helloworld");
> > }
> > ( press ctrl+d here )
> >
> > make testrun
>
> Without writing a Makefile, make won't build the program. ;-)
funny, it did for me :P
just make testrun does "ok,.. testrun = target, what makes testrun?..
*looks around* ah... heres a testrun.c, that aught to do it :D .... "
$ls -l testrun.c Makefile
ls: cannot access Makefile: No such file or directory
-rw-r--r-- 1 devious users 77 2007-07-29 00:24 testrun.c
$make testrun
cc testrun.c -o testrun
$ ./testrun
helloworld
> You better try this:
>
> gcc -o testrun testrun.c
>
> Uwe
>
> >
> > ./testrun
> >
> > if that fails to do ./testrun, then i figgure the FS your on isn't
> > execable. sorry. ^^
> >
> >
> >
> >
> > --
> > Kent
> > ruby -e '[1, 2, 4, 7, 0, 9, 5, 8, 3, 10, 11, 6, 12, 13].each{|x|
> > print "enNOSPicAMreil kdrtf@gma.com"[(2*x)..(2*x+1)]}'
>
>
>
> --
> Jethro Tull: Maybe, I am not done yet!
> --
> gentoo-user@gentoo.org mailing list
>
>
--
Kent
ruby -e '[1, 2, 4, 7, 0, 9, 5, 8, 3, 10, 11, 6, 12, 13].each{|x|
print "enNOSPicAMreil kdrtf@gma.com"[(2*x)..(2*x+1)]}'
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-28 16:20 ` Kent Fredric
@ 2007-07-28 16:27 ` Boyd Stephen Smith Jr.
0 siblings, 0 replies; 27+ messages in thread
From: Boyd Stephen Smith Jr. @ 2007-07-28 16:27 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1380 bytes --]
On Saturday 28 July 2007, "Kent Fredric" <kentfredric@gmail.com> wrote
about 'Re: [gentoo-user] Running Scripts':
> On 7/29/07, Uwe Thiem <uwix@iway.na> wrote:
> > On 28 July 2007, Kent Fredric wrote:
> > > try a plain old bash script and see if that works, and try this and
> > > see if it works:
> > >
> > > cat >> testrun.c
> > > #include <stdio.h>
> > > int main(int argc, int* argv)
> > > {
> > > printf("helloworld");
> > > }
> > > ( press ctrl+d here )
> > >
> > > make testrun
> >
> > Without writing a Makefile, make won't build the program. ;-)
>
> funny, it did for me :P
>
> $ls -l testrun.c Makefile
> ls: cannot access Makefile: No such file or directory
> -rw-r--r-- 1 devious users 77 2007-07-29 00:24 testrun.c
>
> $make testrun
> cc testrun.c -o testrun
That cool, but don't count on it to work on all makes.
I'm fairly sure an empty Makefile is valid, since there already suffix
rules required by the standard -- there's just no default target. I guess
GNU make takes that to the logical conclusion and lets you run entirely
without a Makefile as long as you specify a target.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss03@volumehost.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.org/ \_/
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-28 15:01 ` Uwe Thiem
2007-07-28 16:20 ` Kent Fredric
@ 2007-07-28 18:01 ` Arturo 'Buanzo' Busleiman
2007-07-28 18:03 ` Arturo 'Buanzo' Busleiman
2 siblings, 0 replies; 27+ messages in thread
From: Arturo 'Buanzo' Busleiman @ 2007-07-28 18:01 UTC (permalink / raw
To: gentoo-user
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Uwe Thiem wrote:
> Without writing a Makefile, make won't build the program. ;-)
Actually, yes.
If you have a file called something.c you can simply run:
"make something" and it will compile something.c, link something.o and produce a binary named something.
- --
Arturo "Buanzo" Busleiman - Consultor Independiente en Seguridad Informatica
SHOW DE FUTURABANDA - Sabado 18 de Agosto 2007 (Speed King, Capital Federal)
Entradas anticipadas a traves de www.futurabanda.com.ar - Punk Rock Melodico
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGq4R0AlpOsGhXcE0RCrIzAJ0UoX3FRWZzMvOEeA5LVkYg/uQVnQCfTh43
7jCMqXQ39/miaaBy3FwdoWg=
=EPsg
-----END PGP SIGNATURE-----
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-28 15:01 ` Uwe Thiem
2007-07-28 16:20 ` Kent Fredric
2007-07-28 18:01 ` Arturo 'Buanzo' Busleiman
@ 2007-07-28 18:03 ` Arturo 'Buanzo' Busleiman
2 siblings, 0 replies; 27+ messages in thread
From: Arturo 'Buanzo' Busleiman @ 2007-07-28 18:03 UTC (permalink / raw
To: gentoo-user
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Uwe Thiem wrote:
> I am out of ideas - and still a bit puzzled how /usr/bin/env got involved (see
> original post).
Heh, if we had enough trust, I'd remote login to the server and see what's wrong by myself :)
- --
Arturo "Buanzo" Busleiman - Consultor Independiente en Seguridad Informatica
SHOW DE FUTURABANDA - Sabado 18 de Agosto 2007 (Speed King, Capital Federal)
Entradas anticipadas a traves de www.futurabanda.com.ar - Punk Rock Melodico
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGq4TnAlpOsGhXcE0RCq4WAJ9w9zvOkfTXFyBCm5fpiygGJ1cUXACeLSn4
gYHmRwIuIzQcZZW/7mSpxSQ=
=4O8N
-----END PGP SIGNATURE-----
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-user] Re: Running Scripts
2007-07-27 16:14 [gentoo-user] Running Scripts Greg Lindstrom
` (2 preceding siblings ...)
2007-07-27 17:27 ` Uwe Thiem
@ 2007-07-28 23:35 ` Moshe Kamensky
2007-07-29 2:41 ` Moshe Kamensky
2007-07-29 3:26 ` Kent Fredric
3 siblings, 2 replies; 27+ messages in thread
From: Moshe Kamensky @ 2007-07-28 23:35 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1025 bytes --]
Hi,
* Greg Lindstrom <gslindstrom@gmail.com> [27/07/07 12:18]:
> Hello-
>
> I am programming Python (2.4.1) scripts to run on our Gentoo boxes and am
> having a bit of trouble I was hoping you could help me with. My file,
> hello.py looks like this:
>
> #!/usr/bin/python
> print 'hello, python'
>
> I add execute permission to the file and try to run it as follows:
>
> myprompt $ ./hello.py
>
> and get
>
> -bash: ./hello.py: /usr/bin/env: bad interpreter: Permission denied
>
> running /usr/bin/python brings up the python shell, so that's in place.
>
> What am I missing to run these files (they run fine with I type in 'python'
> before the filename). BTW, I have the same issue running Perl scripts which
> is why I'm asking the question here.
>
Did you manage to run such scripts located in other directories? I think
you need support in the kernel for such scripts. Do you see
CONFIG_BINFMT_MISC=y
in /proc/config.gz?
Moshe
> Thanks for your help,
>
> --greg
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-user] Re: Running Scripts
2007-07-28 23:35 ` [gentoo-user] " Moshe Kamensky
@ 2007-07-29 2:41 ` Moshe Kamensky
2007-07-29 12:41 ` Arturo 'Buanzo' Busleiman
2007-07-29 3:26 ` Kent Fredric
1 sibling, 1 reply; 27+ messages in thread
From: Moshe Kamensky @ 2007-07-29 2:41 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]
Hi,
* Greg Lindstrom <gslindstrom@gmail.com> [27/07/07 12:18]:
> Hello-
>
> I am programming Python (2.4.1) scripts to run on our Gentoo boxes and am
> having a bit of trouble I was hoping you could help me with. My file,
> hello.py looks like this:
>
> #!/usr/bin/python
> print 'hello, python'
>
> I add execute permission to the file and try to run it as follows:
>
> myprompt $ ./hello.py
>
> and get
>
> -bash: ./hello.py: /usr/bin/env: bad interpreter: Permission denied
>
> running /usr/bin/python brings up the python shell, so that's in place.
>
> What am I missing to run these files (they run fine with I type in 'python'
> before the filename). BTW, I have the same issue running Perl scripts which
> is why I'm asking the question here.
>
Did you manage to run such scripts located in other directories? I think
you need support in the kernel for such scripts. Do you see
CONFIG_BINFMT_MISC=y
in /proc/config.gz?
Moshe
> Thanks for your help,
>
> --greg
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Re: Running Scripts
2007-07-28 23:35 ` [gentoo-user] " Moshe Kamensky
2007-07-29 2:41 ` Moshe Kamensky
@ 2007-07-29 3:26 ` Kent Fredric
1 sibling, 0 replies; 27+ messages in thread
From: Kent Fredric @ 2007-07-29 3:26 UTC (permalink / raw
To: gentoo-user
On 7/29/07, Moshe Kamensky <moshe.kamensky@googlemail.com> wrote:
> Hi,
>
> * Greg Lindstrom <gslindstrom@gmail.com> [27/07/07 12:18]:
> > Hello-
> >
> > I am programming Python (2.4.1) scripts to run on our Gentoo boxes and am
> > having a bit of trouble I was hoping you could help me with. My file,
> > hello.py looks like this:
> >
> > #!/usr/bin/python
> > print 'hello, python'
> >
> > I add execute permission to the file and try to run it as follows:
> >
> > myprompt $ ./hello.py
> >
> > and get
> >
> > -bash: ./hello.py: /usr/bin/env: bad interpreter: Permission denied
> >
> > running /usr/bin/python brings up the python shell, so that's in place.
> >
> > What am I missing to run these files (they run fine with I type in 'python'
> > before the filename). BTW, I have the same issue running Perl scripts which
> > is why I'm asking the question here.
> >
>
> Did you manage to run such scripts located in other directories? I think
> you need support in the kernel for such scripts. Do you see
>
> CONFIG_BINFMT_MISC=y
>
> in /proc/config.gz?
>
eh? kernel doesn't control fs permissions for binaries.
If he can emerge --help without a problem, then its not an execution
problem, its just a permission problem. I simply figgure hes not
privelaged to run executables on filesystems hes got write access to (
a logical idea for a shared system trying to prevent exploitation )
--
Kent
ruby -e '[1, 2, 4, 7, 0, 9, 5, 8, 3, 10, 11, 6, 12, 13].each{|x|
print "enNOSPicAMreil kdrtf@gma.com"[(2*x)..(2*x+1)]}'
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-28 15:09 ` Uwe Thiem
@ 2007-07-29 8:31 ` Alex Schuster
2007-07-29 12:47 ` Arturo 'Buanzo' Busleiman
0 siblings, 1 reply; 27+ messages in thread
From: Alex Schuster @ 2007-07-29 8:31 UTC (permalink / raw
To: gentoo-user
Uwe Thiem writes:
> I am out of ideas - and still a bit puzzled how /usr/bin/env got
> involved (see original post).
According to the od output, the first line is not "#!/usr/bin/python",
but "#!/usr/bin/env python". But that seems to work well for me, too.
I'd try to put the script onto several file systems and try out what
happens there. emerge starts with "#!/usr/bin/python -O", and I guess
this is still working.
Alex
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-27 18:13 ` Greg Lindstrom
2007-07-27 18:47 ` Uwe Thiem
2007-07-28 12:26 ` Kent Fredric
@ 2007-07-29 12:20 ` David Relson
2007-07-29 12:30 ` Uwe Thiem
2 siblings, 1 reply; 27+ messages in thread
From: David Relson @ 2007-07-29 12:20 UTC (permalink / raw
To: gentoo-user; +Cc: gslindstrom
On Fri, 27 Jul 2007 13:13:08 -0500
Greg Lindstrom wrote:
..[snip]...
> I'm not sure what you are asking here.
>
> $ ls -l /usr/bin/env
> lrwxrwxrwx 1 root root 8 May 18 2006 /usr/bin/env -> /bin/env
>
> $ ls -l /usr/bin/python
> lrwxrwxrwx 1 root root 9 May 18 2006 /usr/bin/python -> python2.4
This looks suspicious to me. /usr/bin/python is a symlink to
python2.4.
Where is python2.4? Is it on your path?
Can you run it with command "python2.4" ???
What do the following commands report:
which python
which python2.4
HTH.
Regards,
David
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-29 12:20 ` David Relson
@ 2007-07-29 12:30 ` Uwe Thiem
0 siblings, 0 replies; 27+ messages in thread
From: Uwe Thiem @ 2007-07-29 12:30 UTC (permalink / raw
To: gentoo-user
On 29 July 2007, David Relson wrote:
> On Fri, 27 Jul 2007 13:13:08 -0500
> Greg Lindstrom wrote:
>
> ..[snip]...
>
> > I'm not sure what you are asking here.
> >
> > $ ls -l /usr/bin/env
> > lrwxrwxrwx 1 root root 8 May 18 2006 /usr/bin/env -> /bin/env
> >
> > $ ls -l /usr/bin/python
> > lrwxrwxrwx 1 root root 9 May 18 2006 /usr/bin/python -> python2.4
>
> This looks suspicious to me. /usr/bin/python is a symlink to
> python2.4.
>
> Where is python2.4? Is it on your path?
Nothing suspicious here. /usr/bin/python is a symlink to /usr/bin/puthon2.4 -
at least on a gentoo system. And while python2.4 *is* in the path
(because /usr/bin is), it doesn't really matter as long as /usr/bin/python
is.
Uwe
--
Jethro Tull: Maybe, I am not done yet!
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Re: Running Scripts
2007-07-29 2:41 ` Moshe Kamensky
@ 2007-07-29 12:41 ` Arturo 'Buanzo' Busleiman
0 siblings, 0 replies; 27+ messages in thread
From: Arturo 'Buanzo' Busleiman @ 2007-07-29 12:41 UTC (permalink / raw
To: gentoo-user
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
This error:
bash: ./hello.py: /usr/bin/env: bad interpreter: Permission denied
Means exactly that "/usr/bin/env is not a balid interpreter, because you don't have permission to
execute it".
Gives us the output of the "id" command, and ls -l /usr/bin/env, of course, run the "id" command
from the user you were logged in when trying the hello.py script.
- --
Arturo "Buanzo" Busleiman - Consultor Independiente en Seguridad Informatica
SHOW DE FUTURABANDA - Sabado 18 de Agosto 2007 (Speed King, Capital Federal)
Entradas anticipadas a traves de www.futurabanda.com.ar - Punk Rock Melodico
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGrIsTAlpOsGhXcE0RCswWAJ9gpPDBb+BHIaOZtDy6nuIwfrThKwCfbRWd
xHOKX/uQyY3noVWxlsKBagA=
=/MDg
-----END PGP SIGNATURE-----
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [gentoo-user] Running Scripts
2007-07-29 8:31 ` Alex Schuster
@ 2007-07-29 12:47 ` Arturo 'Buanzo' Busleiman
0 siblings, 0 replies; 27+ messages in thread
From: Arturo 'Buanzo' Busleiman @ 2007-07-29 12:47 UTC (permalink / raw
To: gentoo-user
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
As another alternative, you could try re-emerging the coreutils package. Also, check your $PATH. It
should include /bin and /usr/bin quite at the beginning.
- --
Arturo "Buanzo" Busleiman - Consultor Independiente en Seguridad Informatica
SHOW DE FUTURABANDA - Sabado 18 de Agosto 2007 (Speed King, Capital Federal)
Entradas anticipadas a traves de www.futurabanda.com.ar - Punk Rock Melodico
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGrIxkAlpOsGhXcE0RCgX8AJ4xWqAYMFI4IMXEVaWU/FFkgGdEwwCfRlwc
mGt3z54ELyCixS8YXONmjIQ=
=zIw7
-----END PGP SIGNATURE-----
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2007-07-29 12:53 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-27 16:14 [gentoo-user] Running Scripts Greg Lindstrom
2007-07-27 17:04 ` Alex Schuster
2007-07-27 17:11 ` Boyd Stephen Smith Jr.
2007-07-27 17:27 ` Uwe Thiem
2007-07-27 18:13 ` Greg Lindstrom
2007-07-27 18:47 ` Uwe Thiem
2007-07-27 19:04 ` Greg Lindstrom
2007-07-27 19:18 ` Eric Martin
2007-07-27 19:23 ` Florian Philipp
2007-07-28 6:29 ` Dirk Heinrichs
2007-07-27 20:38 ` Arturo 'Buanzo' Busleiman
2007-07-28 12:26 ` Kent Fredric
2007-07-28 14:33 ` Greg Lindstrom
2007-07-28 15:09 ` Uwe Thiem
2007-07-29 8:31 ` Alex Schuster
2007-07-29 12:47 ` Arturo 'Buanzo' Busleiman
2007-07-28 15:01 ` Uwe Thiem
2007-07-28 16:20 ` Kent Fredric
2007-07-28 16:27 ` Boyd Stephen Smith Jr.
2007-07-28 18:01 ` Arturo 'Buanzo' Busleiman
2007-07-28 18:03 ` Arturo 'Buanzo' Busleiman
2007-07-29 12:20 ` David Relson
2007-07-29 12:30 ` Uwe Thiem
2007-07-28 23:35 ` [gentoo-user] " Moshe Kamensky
2007-07-29 2:41 ` Moshe Kamensky
2007-07-29 12:41 ` Arturo 'Buanzo' Busleiman
2007-07-29 3:26 ` Kent Fredric
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox