[Samba] Samba 3.4.3 and DOS read only

Jim Gallagher jim at thegallaghers.biz
Sun Aug 26 14:46:12 MDT 2012


Günter,

I am using the Windows file properties dialog and checking the read only
box. I have tested with both Windows 2003 and Windows 7 Enterprise clients,
with the same results. It seems strange to me that there is no log entry on
the samba side, but I am not familiar with the log levels.

Using wireshark, I definitely see traffic after selecting OK from the
dialog when attempting to set RO, but I don't know enough about the
protocol to decipher what's going on.

Thanks,
Jim



On Sun, Aug 26, 2012 at 9:34 AM, Günter Kukkukk <linux at kukkukk.com> wrote:

>
> Hi Jim,
>
> in your smbd debug log i don't see any call where the dos
> attributes are modified.
> From what kind of client are you connecting and which commands
> do you use to change the readonly/readwrite dos attribute ?
>
> As Jeremy already posted, with smblient you can use
>   setmode <filename> +r (or -r)
> Inside a windows MSDOS cmdline window you can use
>   attrib *            (to list the current attributes)
>   attrib +r somefile  (to set that file read only)
>   attrib -r somefile  (to set that file read/write)
> Also the windows GUI file explorer can be used.
>
> With samba "log level = 4" here i get the following logged:
>
> a.) Setting read/write for file "test.fil":
> [2012/08/26 17:40:11.977248,  3] smbd/dosmode.c:160(unix_mode)
>   unix_mode(test.fil) returning 0644
> [2012/08/26 17:40:11.977857,  3] smbd/reply.c:1390(reply_setatr)
>   setatr name=test.fil mode=0
>
> Result on the unix side:
>   -rw-r--r-- 1 gk users 10000 Aug 12  2011 test.fil
> --------------
>
> b.) Setting read only for file "test.fil":
> [2012/08/26 17:41:23.200130,  3] smbd/dosmode.c:160(unix_mode)
>   unix_mode(test.fil) returning 0444
> [2012/08/26 17:41:23.201050,  3] smbd/reply.c:1390(reply_setatr)
>   setatr name=test.fil mode=1
>
> Result on the unix side:
>  -r--r--r-- 1 gk users 10000 Aug 12  2011 test.fil
> -------------
>
> Cheers, Günter
>


More information about the samba mailing list