euglug.org

[작성자:] admin

  • [Eug-lug] Correct Apache User and Group for easy editing / regexes



    Ben BarrettTue Aug 29 11:51:19 PDT 2006

    kedit includes (or incorporates) a nifty GUI widget to help
    construct/learn/parse regexes, although I did not come across it myself I
    find it notable :)  I'm not in KDE-land myself, but I presume it is part of
    the full-blown KDE package and might pop up in other apps.
    
    Oh, and http://www.google.com/search?q=3Dregex+exercises
    showed this if you're feeling lucky:
    http://www.lexmasterclass.com/exercises/regex/index.html
    
        Ben
    
    
    On 8/29/06, Martin Kelly <aomighty at gmail.com> wrote:
    >
    > Alright... . is a lot easier to type than :, so thanks.
    >
    > Yep, I'm working on regular expressions... I can write simple ones at
    > the moment. Do you know of a place that has exercises to test knowledge,
    > because I think the best way to learn would be to practice and actually
    > do it.
    > ...
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://euglug.org/pipermail/euglug/attachments/20060829/295569e8/attac=
    hment.htm
    
  • [Eug-lug] Correct Apache User and Group for easy editing



    Martin KellyTue Aug 29 11:37:45 PDT 2006

    Alright... . is a lot easier to type than :, so thanks.
    
    Yep, I'm working on regular expressions... I can write simple ones at 
    the moment. Do you know of a place that has exercises to test knowledge, 
    because I think the best way to learn would be to practice and actually 
    do it.
    
    Allen Brown wrote:
    > Martin Kelly wrote:
    >> This looks like what I've been looking for. Your example includes 
    >> several things I've never seen before though. Could you explain those 
    >> portions in more detail?
    >>
    >> Specifically, I've never seen the -F switch to ls. Secondly, in:
    >> chown kedwardk.kedwardk ed
    >> Is there a difference between . and : in that? Would this have been 
    >> equivalent?
    >> chown kedwardk:kedwardk ed
    > 
    > I think they are equivalent.  I have a habit of using ".", perhaps
    > dating to my days with HPUX and ksh.
    > 
    >> In the chmod, you did 2777... what does the 2 do that 777 doesn't? 
    >> Then, in the drwxrwsrwx, what does the s mean?
    > 
    > The 2 is the set guid bit for the directory.  It is what does the
    > magic.  777 is very open.  I didn't test whether I could close
    > down that hole.  I suggest you experiment to see how much openness
    > is still neede.
    > 
    >> I suppose my shell skills need a little working.
    >>
    >> Thanks :).
    > 
    > Bash is a powerful language.  With all the commands at
    > its disposal it becomes very powerful.  But if there is one
    > thing I would recommend that everyone learn, it is regular
    > expressions.  The grep man page is a good place to start.
    
  • [Eug-lug] [ot] introduction



    Bob MillerTue Aug 29 11:06:46 PDT 2006

    tmh at cfl.rr.com wrote:
    
    > Just joined the group; I'll introduce myself. My first name is Tim
    > and I live in central Florida near Orlando. My vocation is as a
    > business application programmer which I started in '66 by
    > wire-wrapping boards for Univac 1004/1005s. I spent the next 14 years
    > designing/writing big-iron financial applications: demand desposit,
    > time deposit, installment loan. Since '81 I've specialized in
    > designing/writing micro-iron vertical order processing applications
    > for distribution businesses: automotive aftermarket,
    > awards & presentations, pottery & landscaping.
    
    Hi, Tim.  Welcome.
    
    EUGLUG is in Oregon, as I'm sure you know, but we have members in
    Wisconsin, Colorado, Illinois, and now Florida.  (Couple other places
    I'm forgetting.)  Some of us commute to California too.
    
    It's good to have another pro developer in the group.  
    
    > I am retired excepting continued support for my order processing 
    > application. I join ix user groups as an enjoyable way to keep up with 
    > the state of ix software.
    
    Oh, my.  Your mailbox must be very big. (-:
    
    -- 
    Bob Miller                              K<bob>
                                            kbob at jogger-egg.com
    
  • [Eug-lug] [ot] introduction



    tmh at cfl.rr.comTue Aug 29 10:24:35 PDT 2006

    Just joined the group; I'll introduce myself. My first name is Tim
    and I live in central Florida near Orlando. My vocation is as a
    business application programmer which I started in '66 by
    wire-wrapping boards for Univac 1004/1005s. I spent the next 14 years
    designing/writing big-iron financial applications: demand desposit,
    time deposit, installment loan. Since '81 I've specialized in
    designing/writing micro-iron vertical order processing applications
    for distribution businesses: automotive aftermarket,
    awards & presentations, pottery & landscaping.
    
    My hardware is limited to Intel/AMD powered computers on which I use
    FreeBSD and the Debian distribution of Linux.
    
    My current project is a web enabled horizontal order processing
    application using Apache and Linux/FreeBSD which you can test drive,
    if you wish, at my showroom at www.sababeach.net.
    
    I am retired excepting continued support for my order processing 
    application. I join ix user groups as an enjoyable way to keep up with 
    the state of ix software.
    
    
  • [Eug-lug] Correct Apache User and Group for easy editing



    Allen BrownTue Aug 29 09:59:31 PDT 2006

    Martin Kelly wrote:
    > This looks like what I've been looking for. Your example includes 
    > several things I've never seen before though. Could you explain those 
    > portions in more detail?
    > 
    > Specifically, I've never seen the -F switch to ls. Secondly, in:
    > chown kedwardk.kedwardk ed
    > Is there a difference between . and : in that? Would this have been 
    > equivalent?
    > chown kedwardk:kedwardk ed
    
    I think they are equivalent.  I have a habit of using ".", perhaps
    dating to my days with HPUX and ksh.
    
    > In the chmod, you did 2777... what does the 2 do that 777 doesn't? Then, 
    > in the drwxrwsrwx, what does the s mean?
    
    The 2 is the set guid bit for the directory.  It is what does the
    magic.  777 is very open.  I didn't test whether I could close
    down that hole.  I suggest you experiment to see how much openness
    is still neede.
    
    > I suppose my shell skills need a little working.
    > 
    > Thanks :).
    
    Bash is a powerful language.  With all the commands at
    its disposal it becomes very powerful.  But if there is one
    thing I would recommend that everyone learn, it is regular
    expressions.  The grep man page is a good place to start.
    -- 
    Allen Brown  abrown at peak.org  http://www.peak.org/~abrown/
       There is one thing I can promise you about the outerspace program:
       Your tax dollars will go farther. --- Wernher von Braun
    
    
    > Allen Brown wrote:
    > 
    >> I had a vague memory that setting the directory's suid or guid
    >> bit would cause the file to take on the directory's ownership.
    >> But I can't find the documentation for it.  Anyway, I just
    >> tried it and it works.  This might solve your problem.
    >>
    >> $ mkdir ed; ls -dFl ed
    >> drwxr-xr-x  2 abrown users 1024 2006-08-27 17:17 ed/
    >>
    >> $ sudo bash
    >> # chown kedwardk.kedwardk ed
    >> # chmod 2777 ed; ls -dFl ed
    >> drwxrwsrwx  2 kedwardk kedwardk 1024 2006-08-27 17:17 ed/
    >>
    >> $ touch ed/a; ls -Fl ed/.
    >> total 0
    >> -rw-r--r--  1 abrown kedwardk 0 2006-08-27 17:19 a
    >>
    >> That was for group.  You should be able to get user forcing
    >> if you want.
    
  • [Eug-lug] Correct Apache User and Group for easy editing



    Martin KellyTue Aug 29 00:34:29 PDT 2006

    This looks like what I've been looking for. Your example includes 
    several things I've never seen before though. Could you explain those 
    portions in more detail?
    
    Specifically, I've never seen the -F switch to ls. Secondly, in:
    chown kedwardk.kedwardk ed
    Is there a difference between . and : in that? Would this have been 
    equivalent?
    chown kedwardk:kedwardk ed
    
    In the chmod, you did 2777... what does the 2 do that 777 doesn't? Then, 
    in the drwxrwsrwx, what does the s mean?
    
    I suppose my shell skills need a little working.
    
    Thanks :).
    
    Allen Brown wrote:
    > I had a vague memory that setting the directory's suid or guid
    > bit would cause the file to take on the directory's ownership.
    > But I can't find the documentation for it.  Anyway, I just
    > tried it and it works.  This might solve your problem.
    > 
    > $ mkdir ed; ls -dFl ed
    > drwxr-xr-x  2 abrown users 1024 2006-08-27 17:17 ed/
    > 
    > $ sudo bash
    > # chown kedwardk.kedwardk ed
    > # chmod 2777 ed; ls -dFl ed
    > drwxrwsrwx  2 kedwardk kedwardk 1024 2006-08-27 17:17 ed/
    > 
    > $ touch ed/a; ls -Fl ed/.
    > total 0
    > -rw-r--r--  1 abrown kedwardk 0 2006-08-27 17:19 a
    > 
    > That was for group.  You should be able to get user forcing
    > if you want.
    
  • [Eug-lug] Correct Apache User and Group for easy editing



    Michael MillerMon Aug 28 08:52:27 PDT 2006

    You can always change your default group.
    
    Mike Miller
    
    On 8/27/06, Martin Kelly <aomighty at gmail.com> wrote:
    > Well, doing chmod o+rwx is the easiest, but so insecure I've tried to
    > avoid it. I have added myself to group www-data, but the problem with
    > that is when I create files as my user it defaults to being owned by
    > martin, not www-data and thus apache can't access them (without running
    > a tedious chown -R www-data:www-data /var/www at least).
    >
    > Michael Miller wrote:
    > > You could add your self to what ever group apache belongs too.  You
    > > could also chmod o+rwx as well.
    > >
    > > Mike Miller
    > >
    > > On 8/25/06, Martin Kelly <aomighty at gmail.com> wrote:
    > >> I've been having a problem with my Apache setup in that I'm not sure
    > >> what user I should run it under. The default is www-data, and I could
    > >> just add myself to the www-data group and be able to edit it under my
    > >> user (martin). The problem with that is that when I create files with my
    > >> normal user, they will be owned by martin and thus inaccessible to
    > >> Apache. I could just edit the files with the www-data user, but that is
    > >> annoying in terms of syncing together various files (.vimrc and such)
    > >> between /home/martin and /home/www-data.
    > >>
    > >> I attempted to have Apache run under the user martin by adding the
    > >> following in my Apache config:
    > >>
    > >> User martin
    > >> Group martin
    > >>
    > >> but when I try to have a script create a directory, for example, it
    > >> returns "Permission Denied." This is Apache 2.0.55.
    > >>
    > >> Does anybody have a good solution for this? For example, is there a way
    > >> to make all files created by me in /var/www owned by www-data instead?
    > >>
    > >> Thanks all.
    > >> _______________________________________________
    > >> EUGLUG mailing list
    > >> euglug at euglug.org
    > >> http://www.euglug.org/mailman/listinfo/euglug
    > >>
    > > _______________________________________________
    > > EUGLUG mailing list
    > > euglug at euglug.org
    > > http://www.euglug.org/mailman/listinfo/euglug
    > >
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    >
    
  • [Eug-lug] Correct Apache User and Group for easy editing



    Martin KellySun Aug 27 23:57:44 PDT 2006

    Well, doing chmod o+rwx is the easiest, but so insecure I've tried to 
    avoid it. I have added myself to group www-data, but the problem with 
    that is when I create files as my user it defaults to being owned by 
    martin, not www-data and thus apache can't access them (without running 
    a tedious chown -R www-data:www-data /var/www at least).
    
    Michael Miller wrote:
    > You could add your self to what ever group apache belongs too.  You
    > could also chmod o+rwx as well.
    > 
    > Mike Miller
    > 
    > On 8/25/06, Martin Kelly <aomighty at gmail.com> wrote:
    >> I've been having a problem with my Apache setup in that I'm not sure
    >> what user I should run it under. The default is www-data, and I could
    >> just add myself to the www-data group and be able to edit it under my
    >> user (martin). The problem with that is that when I create files with my
    >> normal user, they will be owned by martin and thus inaccessible to
    >> Apache. I could just edit the files with the www-data user, but that is
    >> annoying in terms of syncing together various files (.vimrc and such)
    >> between /home/martin and /home/www-data.
    >>
    >> I attempted to have Apache run under the user martin by adding the
    >> following in my Apache config:
    >>
    >> User martin
    >> Group martin
    >>
    >> but when I try to have a script create a directory, for example, it
    >> returns "Permission Denied." This is Apache 2.0.55.
    >>
    >> Does anybody have a good solution for this? For example, is there a way
    >> to make all files created by me in /var/www owned by www-data instead?
    >>
    >> Thanks all.
    >> _______________________________________________
    >> EUGLUG mailing list
    >> euglug at euglug.org
    >> http://www.euglug.org/mailman/listinfo/euglug
    >>
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    > 
    
  • [Eug-lug] Correct Apache User and Group for easy editing



    Allen BrownSun Aug 27 17:26:17 PDT 2006

    I had a vague memory that setting the directory's suid or guid
    bit would cause the file to take on the directory's ownership.
    But I can't find the documentation for it.  Anyway, I just
    tried it and it works.  This might solve your problem.
    
    $ mkdir ed; ls -dFl ed
    drwxr-xr-x  2 abrown users 1024 2006-08-27 17:17 ed/
    
    $ sudo bash
    # chown kedwardk.kedwardk ed
    # chmod 2777 ed; ls -dFl ed
    drwxrwsrwx  2 kedwardk kedwardk 1024 2006-08-27 17:17 ed/
    
    $ touch ed/a; ls -Fl ed/.
    total 0
    -rw-r--r--  1 abrown kedwardk 0 2006-08-27 17:19 a
    
    That was for group.  You should be able to get user forcing
    if you want.
    -- 
    Allen Brown  abrown at peak.org  http://www.peak.org/~abrown/
       The world rewards action.  It doesn't reward much of anything else.
         --- Scott Adams
    
    Martin Kelly wrote:
    > I've been having a problem with my Apache setup in that I'm not sure 
    > what user I should run it under. The default is www-data, and I could 
    > just add myself to the www-data group and be able to edit it under my 
    > user (martin). The problem with that is that when I create files with my 
    > normal user, they will be owned by martin and thus inaccessible to 
    > Apache. I could just edit the files with the www-data user, but that is 
    > annoying in terms of syncing together various files (.vimrc and such) 
    > between /home/martin and /home/www-data.
    > 
    > I attempted to have Apache run under the user martin by adding the 
    > following in my Apache config:
    > 
    > User martin
    > Group martin
    > 
    > but when I try to have a script create a directory, for example, it 
    > returns "Permission Denied." This is Apache 2.0.55.
    > 
    > Does anybody have a good solution for this? For example, is there a way 
    > to make all files created by me in /var/www owned by www-data instead?
    > 
    > Thanks all.
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    > 
    
    
  • [Eug-lug] Correct Apache User and Group for easy editing



    Michael MillerSun Aug 27 15:08:58 PDT 2006

    You could add your self to what ever group apache belongs too.  You
    could also chmod o+rwx as well.
    
    Mike Miller
    
    On 8/25/06, Martin Kelly <aomighty at gmail.com> wrote:
    > I've been having a problem with my Apache setup in that I'm not sure
    > what user I should run it under. The default is www-data, and I could
    > just add myself to the www-data group and be able to edit it under my
    > user (martin). The problem with that is that when I create files with my
    > normal user, they will be owned by martin and thus inaccessible to
    > Apache. I could just edit the files with the www-data user, but that is
    > annoying in terms of syncing together various files (.vimrc and such)
    > between /home/martin and /home/www-data.
    >
    > I attempted to have Apache run under the user martin by adding the
    > following in my Apache config:
    >
    > User martin
    > Group martin
    >
    > but when I try to have a script create a directory, for example, it
    > returns "Permission Denied." This is Apache 2.0.55.
    >
    > Does anybody have a good solution for this? For example, is there a way
    > to make all files created by me in /var/www owned by www-data instead?
    >
    > Thanks all.
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    >