Shell files won't execute properly

Jim mickeyboa at sbcglobal.net
Tue Mar 30 14:30:50 UTC 2010


On 03/30/2010 10:12 AM, Robert Nichols wrote:
> On 03/29/2010 06:54 PM, Jim wrote:
>    
>> On 03/29/2010 06:54 PM, Craig White wrote:
>>      
>>> On Mon, 2010-03-29 at 18:45 -0400, Jim wrote:
>>>
>>>        
>>>> On 03/29/2010 06:20 PM, Robert Nichols wrote:
>>>>
>>>>          
>>>>> On 03/29/2010 02:25 PM, Jim wrote:
>>>>>
>>>>>
>>>>>            
>>>>>> On 03/29/2010 02:52 PM, Michael.Coll-Barth at VerizonWireless.com wrote:
>>>>>>
>>>>>>
>>>>>>              
>>>>>>>
>>>>>>>                
> [SNIP]
>    
>>>>>>>> FC12-KDE-4
>>>>>>>>
>>>>>>>> Shell files (/bin/bash) won't execute when Left clicking on
>>>>>>>> them, single
>>>>>>>> or double click.
>>>>>>>>
>>>>>>>> They won't even execute if I tell them "Open With" Konsole,
>>>>>>>> Konsole will
>>>>>>>> open , but file won't execute.
>>>>>>>>
>>>>>>>> If I do a bash "filename" then it will execute in konsole.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                  
>>>>>>> What User/Group are you running these scripts as and what are the
>>>>>>> permissions on the files?
>>>>>>>                
> [SNIP]
>    
>>>>>>>                
>>>>>> The user/user owns the file, same user, and the file permissions is set
>>>>>> to rwxrwxr-x
>>>>>>
>>>>>>
>>>>>>              
>>>>> Are you certain the file system is not mounted "noexec"?
>>>>>
>>>>>
>>>>>
>>>>>            
>>>> How would I check that out ?
>>>>
>>>>          
>>> ----
>>> open a shell, type 'mount'
>>>
>>> Craig
>>>
>>>
>>>
>>>        
>> $ mount
>> /dev/sda1 on / type ext4 (rw)
>> proc on /proc type proc (rw)
>> sysfs on /sys type sysfs (rw)
>> devpts on /dev/pts type devpts (rw,gid=5,mode=620)
>> tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
>> /dev/sda2 on /home type ext4 (rw)
>> none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
>> sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
>> nfsd on /proc/fs/nfsd type nfsd (rw)
>> gvfs-fuse-daemon on /home/mickey/.gvfs type fuse.gvfs-fuse-daemon
>> (rw,nosuid,nodev,user=mickey)
>>      
> OK.  Another possibility is that the file is in DOS format with a carriage
> return (^M) at the end of each line.  That carriage return character on the
> first line "#!/bin/sh^M" will make the kernel look for a nonexistent shell.
> A lot of "smart" editors will hide that character and helpfully reproduce
> that format on each line when you write the file, so you either need a
> keen eye on the status line or a tool like 'od' to see that '^M'.  You
> can try running 'dos2unix' on the file and see if that fixes the problem
> (file size will change).
>
>    

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: internet-tester
Url: http://lists.fedoraproject.org/pipermail/users/attachments/20100330/4bae6f25/attachment.pl 


More information about the users mailing list