Samba permission problem

Samba permission problem

shimi linux-il at shimi.net
Sun Nov 4 02:24:07 IST 2012


On Sun, Nov 4, 2012 at 2:14 AM, Shlomo Solomon <shlomo.solomon at gmail.com>wrote:

> It's not a lock problem (see further details below) and the other
> machine is also Linux.
>
> Just to be a bit clearer, if I open Kwrite on the other (Linux) machine,
> write some text and "save as" to the shared partition, the file is
> created. If I now make a change to the file and try to save, I get an
> error message saying I don't have permission (sorry, I don't remember
> the exact message and am not at the other machine right now).
>

My bad for assuming you're using Samba to share with Windows :)

I googled for how Kwrite saves a file, and found someone who said (although
that he's not sure) that Kwrite first writes the file with a new name, and
when that's success, it renames the file to the old name. (myself adding:
since a rename is an atomic operation, that means that you can never end up
with a truncated file, even in a filesystem full situation...)

If that is true (sorry, going to sleep, won't be doing straces now), then
you may be effectively trying to overwrite a file that is currently "open"
(as per samba), which is similar to a lock.

What happens if you save a file, close kwrite, verify that the connection
is dead in smbstatus, and then try to echo bla bla > filename? Does that
fail to with a permission problem?

And again, look at the verbose logs :)

-- Shimi

P.S. If you're sharing Linux to Linux only, NFS will probably give you
better performance...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20121104/404a1c8b/attachment-0001.html>


More information about the Linux-il mailing list