bash file direct execution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 02/08/05, dan1 <dan1@xxxxxxxxxxxx> wrote:
> >> Again each file's contents:
> >> #! /bin/sh
> >> echo testing
> >>
> >> The result is the following when executed:
> >> [root@box /]# ./ldd
> >> testing
> >> [root@box /]# ./ldd2
> >> [root@box /]#
> >
> >That is unusual. What are you using to edit these files? I seem to
> >recall one of my users having some weirdness with shell scripts
> >because the lines weren't terminated properly.
> >
> >Compare the output from...
> >
> >$ cat -A /ldd
> >$ cat -A /ldd2
> 
> 
> Hello again, Will.
> 
> Good idea. Here is what those files are containing exactly:
> [root@box /]# cat -A /ldd
> #! /bin/sh$
> echo testing$
> $
> [root@box /]# cat -A /ldd2
> #! /bin/sh$
> echo testing$
> $
> [root@box /]#

OK, those both look identical, but ldd2 doesn't run? 

> They seem exactly the same..
> BTW now, for any reason, I can create a new file in the / directory and run
> it properly (before it always didn't output anything). However by creating
> that in the /home directory it won't work, like before in /.

This is weird, could it be SELinux related? Have you got SELinux
enabled? And if so, can it be switched off to check if it's the cause
of the problem?

Will.

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux