[LBo] How to set default permissions

Howard Rosen hrosen33 at highstream.net
Fri Jun 2 17:17:20 CEST 2006


At 06:53 AM 6/2/2006, you wrote:

I would make that 744 to 755.  Let the intruder execute a file, but NOT be 
able to write to it.

Howard

>Emen Zhao wrote:
>>[...]
>>I am a lazy guy
>
>Ah, lazyness. The core virtue of Perl-Programmer :)
>
>>(seems most IT guys enjoy "lazy".J), so that trying to find out if anyway 
>>can make life easier. 744 should be fine by me.
>
>How about a script like the following:
>
>--8<-----[ newperl.sh ]-------------------------
>#! /bin/bash
>
>echo >$1  "#! /usr/bin/perl -w"
>chmod 0744 $1
>emacs  $1 &
>--8<--------------------------------------------
>
>Usage: ./newperl.sh scriptname
>
>This would create the file "scriptname" for you (including the shebang), 
>change the permissions and start the editor with the new file loaded.
>
>Put the script into /usr/bin/ and you can ommit the ./
>
>Good enough?
>
>Stefan
>
>PS: You can change the editor, of course :)
>--
>QnA mailing list - To post: QnA at LinuxBasics.org
>Site: http://LinuxBasics.org
>List-options: http://LinuxBasics.org/cgi-bin/mailman/listinfo/qna





More information about the QnA mailing list