[Samba] Can't create file.

Michael Adam obnox at samba.org
Mon Dec 28 03:34:14 MST 2009


Hi,

jeff sacksteder wrote:
> I can authenticate at the smb level, but there's something wrong at
> the posix level when I try to edit or create files. I am always denied
> access regardless of how loose the file/directory permissions are.
> This is what I am seeing in the logs -
> 
> [2009/12/20 00:57:35, 4] smbd/uid.c:change_to_user(183)
>   change_to_user: Skipping user change - already user
> [2009/12/20 00:57:35, 5] smbd/filename.c:unix_convert(147)
>   unix_convert called on file "New Text Document.txt"
> [2009/12/20 00:57:35, 5] smbd/filename.c:unix_convert(246)
>   unix_convert begin: name = New Text Document.txt, dirpath = , start
> = New Text Document.txt
> [2009/12/20 00:57:35, 5] smbd/filename.c:unix_convert(440)
>   New file New Text Document.txt
> [2009/12/20 00:57:35, 3] smbd/dosmode.c:unix_mode(142)
>   unix_mode(New Text Document.txt) returning 0744
> [2009/12/20 00:57:35, 5] smbd/files.c:file_new(123)
>   allocated file structure 9322, fnum = 13418 (1 used)
> [2009/12/20 00:57:35, 4] smbd/open.c:open_file_ntcreate(1605)
>   calling open_file with flags=0x2 flags2=0x80 mode=0744, access_mask
> = 0x2019f, open_access_mask = 0x2019f
> [2009/12/20 00:57:35, 3] smbd/open.c:open_file(237)
>   Permission denied opening New Text Document.txt
> [2009/12/20 00:57:35, 5] smbd/files.c:file_free(454)
>   freed files structure 13418 (0 used)
> [2009/12/20 00:57:35, 3] smbd/error.c:error_packet_set(106)
>   error packet at smbd/nttrans.c(805) cmd=162 (SMBntcreateX)
> NT_STATUS_ACCESS_DENIED
> 
> other than the mode of the directory, what would cause this to return
> access_denied?

Is the share read only by definition in smb.conf?
This is the default. You need to set "read only = no"
or "writeable = yes" in the share definition.

Or is there a "write list" parameter in your share
definition? If so, does it contain the connecting user?

If the share is marked writeable generally or for the
user in question in smb.conf and you still see the
access denied, then you have to check that the
user that is connecting to the share has enough
unix permissions on the folder of the share.

If this does not help, please provide your smb.conf,
the user accessing the share and output of "ls -ld"
(and possibly "getfacl") of the directory in question.

Cheers - Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 206 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba/attachments/20091228/97be2055/attachment.pgp>


More information about the samba mailing list