Holzwarth Robert
2002-Aug-06 13:15 UTC
[Samba] problem with dos readonly attributes and inherit permissions = yes
The readonly attribute can't be set with inerit permissions = yes. Replacing "inherit permissions = yes" with create mask = 0770 directory mask = 2770 solves the problem, but is not as flexible. I have made a small patch against Samba 2.2.3a, that is working or me without any problems. --- source/smbd/dosmode.c.orig Sat Jun 8 21:36:14 2002 +++ source/smbd/dosmode.c Sat Jun 8 21:37:19 2002 @@ -98,8 +98,11 @@ if (dir_mode) { /* Inherit 666 component of parent directory mode */ + /* added check for DOS readonly attribute */ + if ( !IS_DOS_READONLY(dosmode) ) + result |= dir_mode & (S_IWUSR | S_IWGRP | S_IWOTH); result |= dir_mode - & (S_IRUSR | S_IRGRP | S_IROTH | S_IWUSR | S_IWGRP | S_IWOTH); + & (S_IRUSR | S_IRGRP | S_IROTH); } else { /* Apply mode mask */ result &= lp_create_mask(SNUM(conn)); Regards Robert Holzwarth