Self-correcting permissions? - Mandrake

This is a discussion on Self-correcting permissions? - Mandrake ; Hi all, I have a strange case of directory permissions changing by themselves on me. I created a "/home/pictures" directory as root and changed the permissions to 777. I then began backup up pictures into this directory through Samba. All ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Self-correcting permissions?

  1. Self-correcting permissions?

    Hi all,

    I have a strange case of directory permissions changing by themselves
    on me. I created a "/home/pictures" directory as root and changed the
    permissions to 777. I then began backup up pictures into this directory
    through Samba. All went well for the first 20 minutes or so. Then, I
    got a "permission denied" error and couldn't copy any more pictures or
    make a folder. I check the permissions and found that they had reverted
    to 755.

    I'm guessing there must be a process that acts as some sort of trojan
    protection and corrects permissions. Can anyone shed any light on this?

    Thanks in advance.
    -Greg


  2. Re: Self-correcting permissions?

    Greg wrote:
    > Hi all,
    >
    > I have a strange case of directory permissions changing by themselves
    > on me. I created a "/home/pictures" directory as root and changed the
    > permissions to 777. I then began backup up pictures into this directory
    > through Samba. All went well for the first 20 minutes or so. Then, I
    > got a "permission denied" error and couldn't copy any more pictures or
    > make a folder. I check the permissions and found that they had reverted
    > to 755.
    >
    > I'm guessing there must be a process that acts as some sort of trojan
    > protection and corrects permissions. Can anyone shed any light on this?
    >
    > Thanks in advance.
    > -Greg
    >


    That'd probably be msec. I have no great experience with it, but
    recommend http://www.linode.com/wiki/index.php/Msec_Howto, especially
    the sections on EXCLUDE_REGEXP and PERM_LOCAL.

    As a slight aside, I've never used Samba (which may make this statement
    invalid), but wanting to have 777 on anything doesn't strike me as being
    particularly good.

    Kristian

  3. Re: Self-correcting permissions?

    On 26 Nov 2006 10:20:36 -0800, Greg wrote:
    > Hi all,
    >
    > I have a strange case of directory permissions changing by themselves
    > on me. I created a "/home/pictures" directory as root and changed the
    > permissions to 777.


    777 yeow, but it is your system.

    > I then began backup up pictures into this directory
    > through Samba. All went well for the first 20 minutes or so. Then, I
    > got a "permission denied" error and couldn't copy any more pictures or
    > make a folder. I check the permissions and found that they had reverted
    > to 755.


    Usually will happen on the hour.

    >
    > I'm guessing there must be a process that acts as some sort of trojan
    > protection and corrects permissions.


    cat /etc/crontab
    should show you what directories are executed at what times.
    You can then look in thoses directories to see what is exectuted.

    What you are seeing is the results of the Mandriva Mandriva Linux
    security tools msec

    >Can anyone shed any light on this?


    click up a terminal
    man msec
    and locate msec | grep doc

    Put something like /usr/share/doc/msec-0.50.1 in your browser
    and read what you find in the directory.
    You should be looking for something like /perm.local/ which allows you
    to override whatever is set by the system based on your current
    security level (echo $SECURE_LEVEL).

    Then there is
    http://iew3.technion.ac.il/CC/Comp_n...e/index.html#m

    You may want to bookmark
    http://iew3.technion.ac.il/CC/Comp_news/muo-may02/

  4. Re: Self-correcting permissions?

    Greg wrote:

    > Hi all,
    >
    > I have a strange case of directory permissions changing by themselves
    > on me. I created a "/home/pictures" directory as root and changed the
    > permissions to 777. I then began backup up pictures into this directory
    > through Samba. All went well for the first 20 minutes or so. Then, I
    > got a "permission denied" error and couldn't copy any more pictures or
    > make a folder. I check the permissions and found that they had reverted
    > to 755.
    >
    > I'm guessing there must be a process that acts as some sort of trojan
    > protection and corrects permissions. Can anyone shed any light on this?
    >

    Damned. Having my Mandriva at w0rkplace updated to 2007 a few weeks ago,
    with a nfs-mounted /home from a solarix server. Hmmm, no "root squash"
    there, and a setup something like /home/group/user (for samba, that
    is "path = /home/%G/%U").
    Guess what msec did here, before I took away that rule

    --
    vista policy violation: Microsoft optical mouse found penguin patterns
    on mousepad. Partition scan in progress to remove offending
    incompatible products. Reactivate MS software.
    Linux 2.6.17-mm1,Xorg7.1/nvidia [LinuxCounter#295241,ICQ#4918962]

  5. Re: Self-correcting permissions?

    Greg wrote:

    > I have a strange case of directory permissions changing by themselves
    > on me. I created a "/home/pictures" directory as root and changed the
    > permissions to 777. I then began backup up pictures into this directory
    > through Samba. *All went well for the first 20 minutes or so. *Then, I
    > got a "permission denied" error and couldn't copy any more pictures or
    > make a folder. I check the permissions and found that they had reverted
    > to 755.
    >

    drakperm is the easiest way to sort this out - use a konsole as it does not
    run from the control centre

  6. Re: Self-correcting permissions?

    On Mon, 27 Nov 2006 20:47:00 GMT, WeetHetNeet wrote:

    > drakperm is the easiest way to sort this out - use a konsole as it does not
    > run from the control centre


    Quiet, please, do not tell my systems that.
    They not know it is broke and work just fine for me.
    I will admit I have not used it to create /etc/security/msec/perm.local
    but I just checked and it added and made modifications without a problem.

    $ hostname
    wb.home.invalid

    $ cat /etc/release
    Mandriva Linux release 2007.0 (Official) for i586

    $ hostname
    wb1.home.invalid

    $ cat /etc/release
    Mandriva Linux release 2006.0 (Official) for i586

  7. Re: Self-correcting permissions?

    On 2006-11-27, Bit Twister wrote:
    > On Mon, 27 Nov 2006 20:47:00 GMT, WeetHetNeet wrote:
    >
    >> drakperm is the easiest way to sort this out - use a konsole as it does not
    >> run from the control centre

    >
    > Quiet, please, do not tell my systems that.
    > They not know it is broke and work just fine for me.
    > I will admit I have not used it to create /etc/security/msec/perm.local
    > but I just checked and it added and made modifications without a problem.
    >
    > $ hostname
    > wb.home.invalid
    >
    > $ cat /etc/release
    > Mandriva Linux release 2007.0 (Official) for i586
    >
    > $ hostname
    > wb1.home.invalid
    >
    > $ cat /etc/release
    > Mandriva Linux release 2006.0 (Official) for i586


    A suggestion for the OP: You might want to consider setting
    the 't' bit. This will prevent one (non-root) user from
    deleting files created by another user. It is often used
    for directories like /tmp where everyone needs to create
    files but you don't want users deleting other users' files.

    --
    Robert Riches
    spamtrap42@verizon.net
    (Yes, that is one of my email addresses.)

+ Reply to Thread