lkml.org 
[lkml]   [2006]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: Executable shell scripts
    Date
    Douglas McNaught <doug@mcnaught.org> wrote:
    > It needs to be readable as well. What ends up happening is that the
    > kernel sees the execute bit, looks at the shebang line and then does:
    >
    > /bin/sh test
    >
    > Since read permission is off, the shell's open() call fails. It will
    > work fine if you use 755 as the permissions.
    >
    > Every Unix I've ever seen works this way. It'd be nice to have
    > unreadable executable scripts, but no one's ever done it.

    According to
    http://www.faqs.org/faqs/unix-faq/faq/part4/section-7.html both 4.3BSD
    and SunOS have. I can confirm that it works on current BSD's as
    well.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-05-13 13:30    [W:4.044 / U:2.496 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site