Re: [expert] Can't run perl scripts as non-root in 9.1
On Mon, 2003-07-28 at 21:05, Todd Lyons wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 James Sparenberg wanted us to know: Or worse: #!/usr.perl\r\n ? ^^ This is one of the most subtle problems when a script won't start... it's not visible in most editors unless in hex mode. This bug makes it appear the progname contains a carriage return as the last character of its name. In other words, it's in dos format. Open the file in vi, run :set ff=unix ... Except OP said he'd already checked that -- James' path idea is a good one, maybe a locate bin/perl is in order? -- Jack Coates Monkeynoodle: A Scientific Venture... Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Can't run perl scripts as non-root in 9.1
Funky. What's the msec SECURE_LEVEL? cat /etc/sysconfig/msec. If it's 4 or 5, that's a damn good place to start looking. On Mon, 2003-07-28 at 12:14, Ryan Hanlon wrote: I installed 9.1 a few weeks ago, and just recently discovered that non-root users can't run perl scripts. If I run any script with #!/usr/bin/perl in the first line, I get something like this: -bash: ./test.pl: /usr/bin/perl: bad interpreter: Permission denied The script itself is executable, and permissions are correct on Perl. (/usr/bin/perl is a link to perl5, which is a link to 5.8.0, which is 755) There are no \r's or other odd characters in the shebang line. There are no acl's set on any of /usr/bin/perl* or the parent directories. Any normal user can execute /usr/bin/perl somescript.pl, but can't run somescript.pl by itself. If this is a problem with the default Mandrake setup then I'm sure the question has been asked before, but I haven't found any suggestions on Google except the usual things above. Is there anything else that can cause this? Maybe extra restrictions set in kernel-secure? I can't imagine why someone would think that's a security feature. And for the bonus question, how can I undo whatever it is that prevents users from running perl normally? Appreciate any thoughts. Ryan __ Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com -- Jack Coates Monkeynoodle: A Scientific Venture... Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Can't run perl scripts as non-root in 9.1
Here's the /etc/security/msec directory: -rwxr-xr-x1 root root0 Jul 10 11:47 security.conf* lrwxrwxrwx1 root root 27 Jul 10 11:05 server - /etc/security/msec/server.4 -rw-r--r--1 root root 193 Mar 7 06:41 server.4 -rw-r--r--1 root root 104 Mar 7 06:41 server.5 And env says SECURE_LEVEL=4. From that directory though, I can't see the correct way to set it lower than 4. I don't think you can just change the variable (I can 'export SECURE_LEVEL=1', but it doesn't change the perl behavior). Ryan On 28 Jul 2003, Jack Coates wrote: Funky. What's the msec SECURE_LEVEL? cat /etc/sysconfig/msec. If it's 4 or 5, that's a damn good place to start looking. On Mon, 2003-07-28 at 12:14, Ryan Hanlon wrote: I installed 9.1 a few weeks ago, and just recently discovered that non-root users can't run perl scripts. If I run any script with #!/usr/bin/perl in the first line, I get something like this: -bash: ./test.pl: /usr/bin/perl: bad interpreter: Permission denied The script itself is executable, and permissions are correct on Perl. (/usr/bin/perl is a link to perl5, which is a link to 5.8.0, which is 755) There are no \r's or other odd characters in the shebang line. There are no acl's set on any of /usr/bin/perl* or the parent directories. Any normal user can execute /usr/bin/perl somescript.pl, but can't run somescript.pl by itself. If this is a problem with the default Mandrake setup then I'm sure the question has been asked before, but I haven't found any suggestions on Google except the usual things above. Is there anything else that can cause this? Maybe extra restrictions set in kernel-secure? I can't imagine why someone would think that's a security feature. And for the bonus question, how can I undo whatever it is that prevents users from running perl normally? Appreciate any thoughts. Ryan __ Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Can't run perl scripts as non-root in 9.1
Viestissä Maanantai 28 Heinäkuu 2003 23:30, Ryan Hanlon kirjoitti: Here's the /etc/security/msec directory: -rwxr-xr-x1 root root0 Jul 10 11:47 security.conf* lrwxrwxrwx1 root root 27 Jul 10 11:05 server - /etc/security/msec/server.4 -rw-r--r--1 root root 193 Mar 7 06:41 server.4 -rw-r--r--1 root root 104 Mar 7 06:41 server.5 And env says SECURE_LEVEL=4. From that directory though, I can't see the correct way to set it lower than 4. I don't think you can just change the variable (I can 'export SECURE_LEVEL=1', but it doesn't change the perl behavior). Ryan 'man msec' will tell you how to change the security level... Thomas Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Can't run perl scripts as non-root in 9.1
On Mon, 2003-07-28 at 13:30, Ryan Hanlon wrote: Here's the /etc/security/msec directory: -rwxr-xr-x1 root root0 Jul 10 11:47 security.conf* lrwxrwxrwx1 root root 27 Jul 10 11:05 server - /etc/security/msec/server.4 -rw-r--r--1 root root 193 Mar 7 06:41 server.4 -rw-r--r--1 root root 104 Mar 7 06:41 server.5 that's very nice, now cat /etc/sysconfig/msec like I said :-) That's where you'll see the level that's being set. And env says SECURE_LEVEL=4. From that directory though, I can't see the correct way to set it lower than 4. I don't think you can just change the variable (I can 'export SECURE_LEVEL=1', but it doesn't change the perl behavior). Ryan man msec -- you can msec [level] to change it. On 28 Jul 2003, Jack Coates wrote: Funky. What's the msec SECURE_LEVEL? cat /etc/sysconfig/msec. If it's 4 or 5, that's a damn good place to start looking. On Mon, 2003-07-28 at 12:14, Ryan Hanlon wrote: I installed 9.1 a few weeks ago, and just recently discovered that non-root users can't run perl scripts. If I run any script with #!/usr/bin/perl in the first line, I get something like this: -bash: ./test.pl: /usr/bin/perl: bad interpreter: Permission denied The script itself is executable, and permissions are correct on Perl. (/usr/bin/perl is a link to perl5, which is a link to 5.8.0, which is 755) There are no \r's or other odd characters in the shebang line. There are no acl's set on any of /usr/bin/perl* or the parent directories. Any normal user can execute /usr/bin/perl somescript.pl, but can't run somescript.pl by itself. If this is a problem with the default Mandrake setup then I'm sure the question has been asked before, but I haven't found any suggestions on Google except the usual things above. Is there anything else that can cause this? Maybe extra restrictions set in kernel-secure? I can't imagine why someone would think that's a security feature. And for the bonus question, how can I undo whatever it is that prevents users from running perl normally? Appreciate any thoughts. Ryan __ Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com __ Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com -- Jack Coates Monkeynoodle: A Scientific Venture... Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Can't run perl scripts as non-root in 9.1
Sorry :) /etc/sysconfig/msec says: UMASK_ROOT=022 SECURE_LEVEL=4 HISTFILESIZE=10 UMASK_USER=022 TMOUT=0 I tried running msec but no matter which level I set it to, it still doesn't seem to affect the perl behavior. Whatever level I set does show in /etc/sysconfig/msec. Ryan On Mon, 2003-07-28 at 13:30, Ryan Hanlon wrote: Here's the /etc/security/msec directory: -rwxr-xr-x1 root root Jul 10 11:47 security.conf* lrwxrwxrwx1 root root 27 Jul 10 11:05 server - /etc/security/msec/server.4 -rw-r--r--1 root root 193 Mar 7 06:41 server.4 -rw-r--r--1 root root 104 Mar 7 06:41 server.5 that's very nice, now cat /etc/sysconfig/msec like I said :-) That's where you'll see the level that's being set. And env says SECURE_LEVEL=4. From that directory though, I can't see the correct way to set it lower than 4. I don't think you can just change the variable (I can 'export SECURE_LEVEL=1', but it doesn't change the perl behavior). Ryan man msec -- you can msec [level] to change it. On 28 Jul 2003, Jack Coates wrote: Funky. What's the msec SECURE_LEVEL? cat /etc/sysconfig/msec. If it's 4 or 5, that's a damn good place to start looking. On Mon, 2003-07-28 at 12:14, Ryan Hanlon wrote: I installed 9.1 a few weeks ago, and just recently discovered that non-root users can't run perl scripts. If I run any script with #!/usr/bin/perl in the first line, I get something like this: -bash: ./test.pl: /usr/bin/perl: bad interpreter: Permission denied The script itself is executable, and permissions are correct on Perl. (/usr/bin/perl is a link to perl5, which is a link to 5.8.0, which is 755) There are no \r's or other odd characters in the shebang line. There are no acl's set on any of /usr/bin/perl* or the parent directories. Any normal user can execute /usr/bin/perl somescript.pl, but can't run somescript.pl by itself. If this is a problem with the default Mandrake setup then I'm sure the question has been asked before, but I haven't found any suggestions on Google except the usual things above. Is there anything else that can cause this? Maybe extra restrictions set in kernel-secure? I can't imagine why someone would think that's a security feature. And for the bonus question, how can I undo whatever it is that prevents users from running perl normally? Appreciate any thoughts. Ryan __ Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com __ Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com -- Jack Coates Monkeynoodle: A Scientific Venture... Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Can't run perl scripts as non-root in 9.1
dang, there goes the easy solution. Next step is to rpm -e --force perl and urpmi perl. On Mon, 2003-07-28 at 15:38, [EMAIL PROTECTED] wrote: Sorry :) /etc/sysconfig/msec says: UMASK_ROOT=022 SECURE_LEVEL=4 HISTFILESIZE=10 UMASK_USER=022 TMOUT=0 I tried running msec but no matter which level I set it to, it still doesn't seem to affect the perl behavior. Whatever level I set does show in /etc/sysconfig/msec. Ryan On Mon, 2003-07-28 at 13:30, Ryan Hanlon wrote: Here's the /etc/security/msec directory: -rwxr-xr-x1 root root Jul 10 11:47 security.conf* lrwxrwxrwx1 root root 27 Jul 10 11:05 server - /etc/security/msec/server.4 -rw-r--r--1 root root 193 Mar 7 06:41 server.4 -rw-r--r--1 root root 104 Mar 7 06:41 server.5 that's very nice, now cat /etc/sysconfig/msec like I said :-) That's where you'll see the level that's being set. And env says SECURE_LEVEL=4. From that directory though, I can't see the correct way to set it lower than 4. I don't think you can just change the variable (I can 'export SECURE_LEVEL=1', but it doesn't change the perl behavior). Ryan man msec -- you can msec [level] to change it. On 28 Jul 2003, Jack Coates wrote: Funky. What's the msec SECURE_LEVEL? cat /etc/sysconfig/msec. If it's 4 or 5, that's a damn good place to start looking. On Mon, 2003-07-28 at 12:14, Ryan Hanlon wrote: I installed 9.1 a few weeks ago, and just recently discovered that non-root users can't run perl scripts. If I run any script with #!/usr/bin/perl in the first line, I get something like this: -bash: ./test.pl: /usr/bin/perl: bad interpreter: Permission denied The script itself is executable, and permissions are correct on Perl. (/usr/bin/perl is a link to perl5, which is a link to 5.8.0, which is 755) There are no \r's or other odd characters in the shebang line. There are no acl's set on any of /usr/bin/perl* or the parent directories. Any normal user can execute /usr/bin/perl somescript.pl, but can't run somescript.pl by itself. If this is a problem with the default Mandrake setup then I'm sure the question has been asked before, but I haven't found any suggestions on Google except the usual things above. Is there anything else that can cause this? Maybe extra restrictions set in kernel-secure? I can't imagine why someone would think that's a security feature. And for the bonus question, how can I undo whatever it is that prevents users from running perl normally? Appreciate any thoughts. Ryan __ Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com __ Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com -- Jack Coates Monkeynoodle: A Scientific Venture... __ Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com -- Jack Coates Monkeynoodle: A Scientific Venture... Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Can't run perl scripts as non-root in 9.1
On Mon, 2003-07-28 at 15:38, [EMAIL PROTECTED] wrote: Sorry :) /etc/sysconfig/msec says: UMASK_ROOT=022 SECURE_LEVEL=4 HISTFILESIZE=10 UMASK_USER=022 TMOUT=0 I tried running msec but no matter which level I set it to, it still doesn't seem to affect the perl behavior. Whatever level I set does show in /etc/sysconfig/msec. Ryan Ok... I'm a dummy here but one question. Does the first line in the perl script the one that should be something like #!/usr/bin/perl Actually say that or does it say #!/usr/local/bin/perl If it does then either change the second to the first or but a symlink in usr/local/bin to perl in usr bin. (second one is better you'll see this a lot.) James On Mon, 2003-07-28 at 13:30, Ryan Hanlon wrote: Here's the /etc/security/msec directory: -rwxr-xr-x1 root root Jul 10 11:47 security.conf* lrwxrwxrwx1 root root 27 Jul 10 11:05 server - /etc/security/msec/server.4 -rw-r--r--1 root root 193 Mar 7 06:41 server.4 -rw-r--r--1 root root 104 Mar 7 06:41 server.5 that's very nice, now cat /etc/sysconfig/msec like I said :-) That's where you'll see the level that's being set. And env says SECURE_LEVEL=4. From that directory though, I can't see the correct way to set it lower than 4. I don't think you can just change the variable (I can 'export SECURE_LEVEL=1', but it doesn't change the perl behavior). Ryan man msec -- you can msec [level] to change it. On 28 Jul 2003, Jack Coates wrote: Funky. What's the msec SECURE_LEVEL? cat /etc/sysconfig/msec. If it's 4 or 5, that's a damn good place to start looking. On Mon, 2003-07-28 at 12:14, Ryan Hanlon wrote: I installed 9.1 a few weeks ago, and just recently discovered that non-root users can't run perl scripts. If I run any script with #!/usr/bin/perl in the first line, I get something like this: -bash: ./test.pl: /usr/bin/perl: bad interpreter: Permission denied The script itself is executable, and permissions are correct on Perl. (/usr/bin/perl is a link to perl5, which is a link to 5.8.0, which is 755) There are no \r's or other odd characters in the shebang line. There are no acl's set on any of /usr/bin/perl* or the parent directories. Any normal user can execute /usr/bin/perl somescript.pl, but can't run somescript.pl by itself. If this is a problem with the default Mandrake setup then I'm sure the question has been asked before, but I haven't found any suggestions on Google except the usual things above. Is there anything else that can cause this? Maybe extra restrictions set in kernel-secure? I can't imagine why someone would think that's a security feature. And for the bonus question, how can I undo whatever it is that prevents users from running perl normally? Appreciate any thoughts. Ryan __ Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com __ Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com -- Jack Coates Monkeynoodle: A Scientific Venture... __ Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Can't run perl scripts as non-root in 9.1
On 28 Jul 2003 18:26:34 -0700 James Sparenberg [EMAIL PROTECTED] wrote: Ok... I'm a dummy here but one question. Does the first line in the perl script the one that should be something like #!/usr/bin/perl Actually say that or does it say #!/usr/local/bin/perl Or worse: #!/usr.perl\r\n ? ^^ This is one of the most subtle problems when a script won't start... it's not visible in most editors unless in hex mode. This bug makes it appear the progname contains a carriage return as the last character of its name. I didn't respond sooner because the Subject implies the script does work when run as root... Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Can't run perl scripts as non-root in 9.1
On Mon, 2003-07-28 at 19:30, Pierre Fortin wrote: On 28 Jul 2003 18:26:34 -0700 James Sparenberg [EMAIL PROTECTED] wrote: Ok... I'm a dummy here but one question. Does the first line in the perl script the one that should be something like #!/usr/bin/perl Actually say that or does it say #!/usr/local/bin/perl Or worse: #!/usr.perl\r\n ? ^^ This is one of the most subtle problems when a script won't start... it's not visible in most editors unless in hex mode. This bug makes it appear the progname contains a carriage return as the last character of its name. I didn't respond sooner because the Subject implies the script does work when run as root... I was kinda keying of the fact that he said a normal user could do /usr/bin/perl somescript.pl but not somescript.pl even though it is 755 in permissions. __ Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Can't run perl scripts as non-root in 9.1
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 James Sparenberg wanted us to know: Or worse: #!/usr.perl\r\n ? ^^ This is one of the most subtle problems when a script won't start... it's not visible in most editors unless in hex mode. This bug makes it appear the progname contains a carriage return as the last character of its name. In other words, it's in dos format. Open the file in vi, run :set ff=unix and then save it. Now the script will work. Another way to spot it is from the output of the file command: [EMAIL PROTECTED] ~]$ file sandpiper sandpiper: ASCII English text [EMAIL PROTECTED] ~]$ file sandpiper.dos sandpiper.dos: ASCII English text, with CRLF line terminators I didn't respond sooner because the Subject implies the script does work when run as root... Same here. - -- Blue skies... Todd Public key: http://www.mrball.net/todd.asc They dont need to adjust their pricing, they just need to lobby for new laws to protect their flawed business models. Oh wait, they just did that. --Dan Hollis Linux kernel 2.4.19-24mdk 5 users, load average: 0.02, 0.01, 0.00 -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.2 (GNU/Linux) Comment: http://www.mrball.net/todd.asc iD8DBQE/JfKnIBT1264ScBURAriAAJ454qHUdHZxktyD+SM3cuMWLMlYywCcCuca 3gDT/W0ImSOW7Nd+E1P8G2A= =uVJX -END PGP SIGNATURE- Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com