Re: Shell files won't execute properly

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

 



On Tue, 2010-03-30 at 09:12 -0500, 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@xxxxxxxxxxxxxxxxxxx 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).
> 
> -- 
> Bob Nichols     "NOSPAM" is really part of my email address.
>                  Do NOT delete it.
> 
the output of the 'file' command should tell you if it is a script or
not, if it says the file is ascii run dos2unix on it.

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux