Find the answer to your Linux question:
Results 1 to 8 of 8
I have a samba share directory /home/stuff which I chmod to 771 to allow group access, however the directory reverts back to 711 permissions after 5 mins. Any ideas?? (mandrake ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2006
    Posts
    4

    CHMOD on smb share reverts back after 5 mins


    I have a samba share directory /home/stuff which I chmod to 771 to allow group access, however the directory reverts back to 711 permissions after 5 mins. Any ideas?? (mandrake 2005)

  2. #2
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,127
    Are you changing this on the samba server, or from a remote box? Are the share permissions being changed or the file permissions?

  3. #3
    Just Joined!
    Join Date
    May 2006
    Posts
    4
    Changing the permissions on the share directory from the server.

    This allows you access from windows, however 5 mins later you can't access the share directory because the permissions on the directory have changed back. Any idea what is causing the permissions to change back?

  4. #4
    Linux Guru antidrugue's Avatar
    Join Date
    Oct 2005
    Location
    Montreal, Canada
    Posts
    3,211
    Quote Originally Posted by lintech
    Changing the permissions on the share directory from the server.

    This allows you access from windows, however 5 mins later you can't access the share directory because the permissions on the directory have changed back. Any idea what is causing the permissions to change back?
    Are you using lines like those ones in your /etc/samba/smb.conf:
    Code:
    create mask = 0771
    directory mask = 0771
    ?

    See
    Code:
    man smb.conf
    for more.
    "To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."

    -Bruce Lee

  5. #5
    Just Joined!
    Join Date
    May 2006
    Posts
    4
    so far no joy, will try and simplify things tomorrow and see if I can have any luck. Thanks.

  6. #6
    Just Joined!
    Join Date
    Jun 2004
    Location
    Portugal
    Posts
    47
    msec (Mandriva Linux Security package) manages homedir permissions by default, forcing to be 711 for obvious security reasons.

    Solutions:

    1 - Move this directory from under /home.

    or

    2 - Tell msec the permissions you want for this directory.

    The second alternative is done by adding one of the following lines to /etc/security/msec/perm.local (which one depends on your desire to force change or maintain the current directory owners):

    Code:
    /home/stuff desireduser.desiredgroup 711
    or

    Code:
    /home/stuff current 711
    It's possible that the file /etc/security/msec/perm.local doesn't exist. Create it then.

  7. #7
    Just Joined!
    Join Date
    May 2006
    Posts
    4
    Thanks for that hchasqueira, that seems to be working nice. I have noted that solution down and squirrelled it away for next time.

  8. #8
    Just Joined!
    Join Date
    Sep 2006
    Location
    Stratford upon Avon, UK
    Posts
    12
    At least you get 5 minutes! Take a look at this:

    [root@Hounslow john]# chmod -v 777 /mnt/win_c3

    mode of `/mnt/win_c3' changed to 0777 (rwxrwxrwx)

    [root@Hounslow john]# chmod -v 777 /mnt/win_c2

    mode of `/mnt/win_c2' changed to 0777 (rwxrwxrwx)

    [root@Hounslow john]# ls -l /mnt

    total 24

    drwxr-xr-x 2 root root 4096 Sep 10 14:12 cdrom/

    drwxr-xr-x 2 root root 4096 Sep 10 14:12 floppy/

    drwxr-xr-x 2 root root 8192 Jan 1 1970 win_c2/

    drwxr-xr-x 2 root root 8192 Jan 1 1970 win_c3/

    [root@Hounslow john]#

    I have 2 shares (both entire 9.1GB disk drives) win_c2 and win_c3
    but they seem to be obstinately readonly. As you can see above, using chmod to change the permissions makes no difference.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •