Samba permission problem

Samba permission problem

Oleg Goldshmidt pub at goldshmidt.org
Sun Nov 4 11:21:41 IST 2012


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

> I have a partition on my computer defined as a share on Samba. A user
> on another machine can read and create files. Files are created as
> rw-r--r-- as intended. But even though the user can create a file, the
> new file can't be saved after editing/changing it.
>

Without trying or testing anything I'd suggest checking a couple of things
(that I am quite sure you know but they may be a bit obfuscated with samba):

1. Creating/deleting files is controlled by permissions on the containing
directory, while modifying a file - by permissions on the file itself.

2. There are two sets of permissions - and umasks - at work: those on the
server and those on the mounting client. Check the ownership/permissions
(see #1 above) on the server and then the mount options on the client, such
as ro/rw,dom,cred,user,password,uid,gid,file_mode,dir_mode, et caetera.

I suggest reading the FILE AND DIRECTORY OWNERSHIP AND PERMISSIONS section
of "man mount.cifs" - it may provide hints, starting  with

       The core CIFS protocol does not provide unix ownership information
or mode for files and
       directories. Because of this, files and directories will generally
appear to be owned by
       whatever values the uid= or gid= options are set, and will have
permissions set to the default
       file_mode and dir_mode for the mount. Attempting to change these
values via chmod/chown will
       return success but have no effect.

and so on.

In my experience checking both sides *methodically* usually leads one to
the cause of the problem.

Sorry, can't think of anything more specific at the moment.

-- 
Oleg Goldshmidt | pub at goldshmidt.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20121104/bbf5a2c4/attachment.html>


More information about the Linux-il mailing list