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 ...
- 05-29-2006 #1Just 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)
- 05-29-2006 #2Linux Guru
- Join Date
- Nov 2004
- Posts
- 6,110
Are you changing this on the samba server, or from a remote box? Are the share permissions being changed or the file permissions?
- 05-29-2006 #3Just 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?
- 05-29-2006 #4Are you using lines like those ones in your /etc/samba/smb.conf:
Originally Posted by lintech
?Code:create mask = 0771 directory mask = 0771
See
for more.Code:man smb.conf
"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
- 05-29-2006 #5Just 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.
- 05-29-2006 #6Just 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):
orCode:/home/stuff desireduser.desiredgroup 711
It's possible that the file /etc/security/msec/perm.local doesn't exist. Create it then.Code:/home/stuff current 711
- 05-31-2006 #7Just 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.
- 10-13-2006 #8Just 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.


Reply With Quote
