[Samba] chmod + remote save denied = file wiped?

Kevin Field kev at brantaero.com
Tue Aug 20 09:32:30 MDT 2013


BTW, I just confirmed this also happens with SELinux disabled.  -K

On 2013-08-20 11:23 AM, Kevin Field wrote:
> I have a SerNet Samba 4.0.8 AD DC running on CentOS 6.4 (newdc)
> replicating from a W2K3 DC (olddc).  newdc also has a test share.
>
> I'm experiencing something strange whereby chmod and then an attempted
> file save causes a shared file to become zero bytes (despite the save
> not being blank, and also being denied):
>
> At olddc:
>
> 1) open \\newdc\testshare\yay.txt
>
>
> At newdc:
>
> $ ls -l
> total 8
> -rw-rw-rw-. 1 me  me  9 Aug 20 10:59 yay.txt
> $ cat yay.txt
> It works!$ chmod 664 yay.txt
>
>
> At olddc:
>
> 1) add a space to yay.txt and attempt to save.  popup:
>
> ---------------------------
> TextPad
> ---------------------------
> Access to \\newdc\testshare\yay.txt was denied.
> ---------------------------
> OK
> ---------------------------
>
> 2) (optional) click OK to close the popup
>
> At newdc*:
>
> $ ls -l
> total 4
> -rw-rw-r--. 1 kev kev 0 Aug 20 11:12 yay.txt
>
> * Alternatively, without touching newdc, I can shift focus from the
> TextPad window and back to it, and it will say that the file has
> changed.  If I choose to reload it, it's now blank.
>
>
> Isn't this a bug?  I would expect a write that fails due to lack of
> write permissions to not actually affect the content of the file.
>
> Thanks,
> Kev


More information about the samba mailing list