trying to get a daemon to write files as _rwxrwx___ - Suse

This is a discussion on trying to get a daemon to write files as _rwxrwx___ - Suse ; Hi, im running motion, the video surveillance app. Can't get any help from the developers or project team, because they've removed any means of contact from the web. Typical these days. There is a wiki, but you have to register. ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: trying to get a daemon to write files as _rwxrwx___

  1. trying to get a daemon to write files as _rwxrwx___

    Hi, im running motion, the video surveillance app. Can't get any help
    from the developers or project team, because they've removed any means
    of contact from the web. Typical these days. There is a wiki, but you
    have to register. I refuse. Im sick of registrations, and im not going
    to go muck up the wiki hoping to get some attention...

    Anyway I setup my own startup script in /etc/init.d/, which was
    extremely painful by the way (all I wanted to do was run a program at
    startup!! sheesh). So now the dang thing does run at boot time. Yay! But
    Its writing all its output files with unacceptable permissions. I need
    it to be as in the subject. So in my startup script, I have this:

    ....
    start)
    echo -n "Starting motion "
    ## Start daemon with startproc(8). If this fails
    ## the return value is set appropriately by startproc.
    /sbin/startproc -g scam $MOTION_BIN

    # Remember status and be verbose
    rc_status -v
    ;;
    ....

    I tried this:

    start)
    echo -n "Starting motion "
    ## Start daemon with startproc(8). If this fails
    ## the return value is set appropriately by startproc.
    umask g+rwx o-rwx
    /sbin/startproc -g scam $MOTION_BIN

    # Remember status and be verbose
    rc_status -v
    ;;

    and I tried this:

    start)
    echo -n "Starting motion "
    ## Start daemon with startproc(8). If this fails
    ## the return value is set appropriately by startproc.
    /bin/bash -c "umask g+rwx o-rwx"
    /sbin/startproc -g scam $MOTION_BIN

    # Remember status and be verbose
    rc_status -v
    ;;



    But it did not work. Can anyone help me? thanks much.


    _______________
    hello friend!
    i tend to ignore the following kinds of replies: top-bottom-middle
    posting, grammar, spelling, read the manual you %#!, search google you !@%

  2. Re: trying to get a daemon to write files as _rwxrwx___

    On Nov 11, 11:55 pm, takeout wrote:
    > Hi, im running motion, the video surveillance app. Can't get any help
    > from the developers or project team, because they've removed any means
    > of contact from the web. Typical these days. There is a wiki, but you
    > have to register. I refuse. Im sick of registrations, and im not going
    > to go muck up the wiki hoping to get some attention...
    >
    > Anyway I setup my own startup script in /etc/init.d/, which was
    > extremely painful by the way (all I wanted to do was run a program at
    > startup!! sheesh). So now the dang thing does run at boot time. Yay! But
    > Its writing all its output files with unacceptable permissions. I need
    > it to be as in the subject. So in my startup script, I have this:
    >
    > ...
    > start)
    > echo -n "Starting motion "
    > ## Start daemon with startproc(8). If this fails
    > ## the return value is set appropriately by startproc.
    > /sbin/startproc -g scam $MOTION_BIN
    >
    > # Remember status and be verbose
    > rc_status -v
    > ;;
    > ...
    >
    > I tried this:
    >
    > start)
    > echo -n "Starting motion "
    > ## Start daemon with startproc(8). If this fails
    > ## the return value is set appropriately by startproc.
    > umask g+rwx o-rwx
    > /sbin/startproc -g scam $MOTION_BIN
    >
    > # Remember status and be verbose
    > rc_status -v
    > ;;
    >
    > and I tried this:
    >
    > start)
    > echo -n "Starting motion "
    > ## Start daemon with startproc(8). If this fails
    > ## the return value is set appropriately by startproc.
    > /bin/bash -c "umask g+rwx o-rwx"
    > /sbin/startproc -g scam $MOTION_BIN
    >
    > # Remember status and be verbose
    > rc_status -v
    > ;;
    >
    > But it did not work. Can anyone help me? thanks much.
    >
    > _______________
    > hello friend!
    > i tend to ignore the following kinds of replies: top-bottom-middle
    > posting, grammar, spelling, read the manual you %#!, search google you !@%


    Try using the line "chmod 777 filename"

    -mitch


  3. Re: trying to get a daemon to write files as _rwxrwx___

    On 2007-11-12 05:55, takeout wrote:
    > Hi, im running motion, the video surveillance app. Can't get any help
    > from the developers or project team, because they've removed any means
    > of contact from the web. Typical these days. There is a wiki, but you
    > have to register. I refuse. Im sick of registrations, and im not going
    > to go muck up the wiki hoping to get some attention...
    >
    > Anyway I setup my own startup script in /etc/init.d/, which was
    > extremely painful by the way (all I wanted to do was run a program at
    > startup!! sheesh). So now the dang thing does run at boot time. Yay! But
    > Its writing all its output files with unacceptable permissions. I need
    > it to be as in the subject. So in my startup script, I have this:
    >
    > ...
    > start)
    > echo -n "Starting motion "
    > ## Start daemon with startproc(8). If this fails
    > ## the return value is set appropriately by startproc.
    > /sbin/startproc -g scam $MOTION_BIN
    >
    > # Remember status and be verbose
    > rc_status -v
    > ;;
    > ...
    >
    > I tried this:
    >
    > start)
    > echo -n "Starting motion "
    > ## Start daemon with startproc(8). If this fails
    > ## the return value is set appropriately by startproc.
    > umask g+rwx o-rwx
    > /sbin/startproc -g scam $MOTION_BIN
    >
    > # Remember status and be verbose
    > rc_status -v
    > ;;
    >
    > and I tried this:
    >
    > start)
    > echo -n "Starting motion "
    > ## Start daemon with startproc(8). If this fails
    > ## the return value is set appropriately by startproc.
    > /bin/bash -c "umask g+rwx o-rwx"
    > /sbin/startproc -g scam $MOTION_BIN
    >
    > # Remember status and be verbose
    > rc_status -v
    > ;;
    >
    >
    >
    > But it did not work. Can anyone help me? thanks much.
    >
    >
    > _______________
    > hello friend!
    > i tend to ignore the following kinds of replies: top-bottom-middle
    > posting, grammar, spelling, read the manual you %#!, search google you !@%


    Read the manual for umask, it is umask 0 , but why in hell do you set them as
    executables, was it not video ?

    e.g NOT 777 , but in worst case 666, which is what umask 0 will do per default
    on a normal file. (and 777 for a dir)

    /bb

  4. Re: trying to get a daemon to write files as _rwxrwx___

    >
    > e.g NOT 777 , but in worst case 666, which is what umask 0 will do per
    > default
    > on a normal file. (and 777 for a dir)
    >
    > /bb


    Ok umask 007 works for the files it outputs (yes they are video files,
    you're right they don't need execute bit). But it isn't working for the
    folders. The folders are stil rwxr_x___. I need rwxrwx___ on the
    folders. Maybe the daemon is ignoring umask when it makes folders..?

    --
    _______________
    hello friend!
    i tend to ignore the following kinds of replies: top-bottom-middle
    posting, grammar, spelling, read the manual you %#!, search google you
    !@%... thank you.

  5. Re: trying to get a daemon to write files as _rwxrwx___

    On 2007-11-13 06:52, takeout wrote:
    >> e.g NOT 777 , but in worst case 666, which is what umask 0 will do per
    >> default
    >> on a normal file. (and 777 for a dir)
    >>
    >> /bb

    >
    > Ok umask 007 works for the files it outputs (yes they are video files,
    > you're right they don't need execute bit). But it isn't working for the
    > folders. The folders are stil rwxr_x___. I need rwxrwx___ on the
    > folders. Maybe the daemon is ignoring umask when it makes folders..?
    >


    Well "don't need execute bit" is a bit off :-)
    execute bit is just very wrong on any data, it's just as I ask in a windows
    group how to create videos with the name *.EXE .

    Nothing can ignore umask, at least what I know, but any program can set it
    to another value, or just change the permission after creating a directory.

    You must check your program, it seems as the permission 750 is hard coded there
    maybe in a config file.

    If you by hand do umask 0 ; mkdir foo ; touch foo/bar , you will get a dir as
    777 , and a file as 666 .

    /bb



+ Reply to Thread