Samba shared directory is accessible but not able to drop file and files are invisible

Anoop Singh anoop.singh at celstream.com
Wed Aug 26 06:15:07 UTC 2015


Hi Jeremy,

More specifically this is the log in addition to the previous one


 [1970/01/02 09:51:58.326747,  5, pid=18844, effective(9999, 9999), real(0, 0)] ../source3/smbd/files.c:528(file_free)
  freed files structure 2967907669 (2 used)
[1970/01/02 09:51:58.332147, 10, pid=18844, effective(9999, 9999), real(0, 0)] ../source3/smbd/open.c:4094(create_file_unixpath)
  create_file_unixpath: NT_STATUS_OBJECT_NAME_NOT_FOUND
[1970/01/02 09:51:58.332340, 10, pid=18844, effective(9999, 9999), real(0, 0)] ../source3/smbd/open.c:4367(create_file_default)
  create_file: NT_STATUS_OBJECT_NAME_NOT_FOUND
[1970/01/02 09:51:58.332544, 10, pid=18844, effective(9999, 9999), real(0, 0)] ../source3/smbd/smb2_server.c:2598(smbd_smb2_request_error_ex)
  smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_OBJECT_NAME_NOT_FOUND] || at ../source3/smbd/smb2_create.c:303
[1970/01/02 09:51:58.332781, 10, pid=18844, effective(9999, 9999), real(0, 0)] ../source3/smbd/smb2_server.c:2499(smbd_smb2_request_done_ex)
  smbd_smb2_request_done_ex: idx[1] status[NT_STATUS_OBJECT_NAME_NOT_FOUND] body[8] dyn[yes:1] at ../source3/smbd/smb2_server.c:2651

[1970/01/02 09:51:59.351295, 10, pid=18844, effective(9999, 9999), real(0, 0)] ../source3/smbd/open.c:863(open_file)
  open_file: check_parent_access on file snmp.txt returned NT_STATUS_ACCESS_DENIED
[1970/01/02 09:51:59.353184, 10, pid=18844, effective(9999, 9999), real(0, 0)] ../source3/smbd/open.c:4094(create_file_unixpath)
  create_file_unixpath: NT_STATUS_ACCESS_DENIED
[1970/01/02 09:51:59.353361, 10, pid=18844, effective(9999, 9999), real(0, 0)] ../source3/smbd/open.c:4367(create_file_default)
  create_file: NT_STATUS_ACCESS_DENIED

While creating samba share I have done guest ok = yes and made it writable. In windows machine I am able to aces the share without login, then why it says Access Denied when I try to drag and drop a file snmp.txt into this shared folder? Do you have any idea?

Thanks & regards,
Anoop.

-----Original Message-----
From: Anoop Singh
Sent: Wednesday, August 26, 2015 10:42 AM
To: 'Jeremy Allison'
Cc: samba-technical at lists.samba.org
Subject: RE: Samba shared directory is accessible but not able to drop file and files are invisible

Hi Jeremy

Thanks a lot for your mail and kind help.
It is true that my device is bionic and customized so it will have different issues for sure.
But as per your suggestion, I increased the log level to 10 and found a part of log says that

[1970/01/02 09:51:59.351295, 10, pid=18844, effective(9999, 9999), real(0, 0)] ../source3/smbd/open.c:863(open_file)
  open_file: check_parent_access on file snmp.txt returned NT_STATUS_ACCESS_DENIED
[1970/01/02 09:51:59.353184, 10, pid=18844, effective(9999, 9999), real(0, 0)] ../source3/smbd/open.c:4094(create_file_unixpath)
  create_file_unixpath: NT_STATUS_ACCESS_DENIED
[1970/01/02 09:51:59.353361, 10, pid=18844, effective(9999, 9999), real(0, 0)] ../source3/smbd/open.c:4367(create_file_default)
  create_file: NT_STATUS_ACCESS_DENIED

I have attached the full log with this mail.

While creating samba share I have done guest ok = yes and made it writable. In windows machine I am able to aces the share without login, then why it says Access Denied when I try to drag and drop a file snmp.txt into this shared folder? Do you have any idea?

Thanks & regards,
Anoop.

-----Original Message-----
From: Jeremy Allison [mailto:jra at samba.org]
Sent: Tuesday, August 25, 2015 10:19 PM
To: Anoop Singh
Cc: samba-technical at lists.samba.org
Subject: Re: Samba shared directory is accessible but not able to drop file and files are invisible

On Tue, Aug 25, 2015 at 05:57:38AM +0000, Anoop Singh wrote:
> Dear Group Members
>
> I am working on providing samba share on my customized Android device.
> I am able to share a directory using the below mentioned smb.conf but when I drop a file from windows machine to the shared Folder i.e. sharedDir through the network, It doesn't allow and moreover files are not visible on windows machine.
> I see the file is getting created on the device but the content of the file is not copied means file size on the device is zero. Here is the used smb.conf file content:
>
> [global]
>     workgroup = WORKGROUP
>     netbios name = netbios-name
>     interfaces = xx.xxx.xxx.xx/xxx.xxx.xxx.x
> #    server role = active directory domain controller
>     security = user
>     map to guest = Bad Password
>
>
>     [sharedDir]
>     path = /data/sharedDir
>     comment = samba share
>     public = yes
>     writable = yes
>     printable = no
>     create mask = 0755
>     guest ok = yes
>     browseable = yes
>     available = yes
>
> When I checked it on linux device it works fine. Files are getting created and files are visible also in the windows machine. I have attached the smbd log.
> Is this due to some OS support missing on my customized deice or do I need to configure smb.conf with some more parameters?
> Please let me know the solution.

The problem with a customized device is that only you know what was done to it.

If Samba was working correctly then your smb.conf setup looks fine.

You'll have to debug this by using debug level 10 logs and examining where the write isn't getting done.

Android isn't (yet) a supported platform for Samba as unrooted devices don't allow applications to bind to low ports.

Jeremy.

-----------------------------------------------------------------------------------------------------------------------------
DISCLAIMER: This electronic message and any attachments to this electronic message is intended for the exclusive use of the addressee(s) named herein and may contain legally privileged and confidential information. It is the property of Celstream Technologies Private Limited. If you are not the intended recipient, you are hereby strictly notified not to copy, forward, distribute or use this message or any attachments thereto. If you have received this message in error, please delete it and all copies thereof, from your system and notify the sender at Celstream Technologies or administrator at celstream.com immediately.
-----------------------------------------------------------------------------------------------------------------------------



More information about the samba-technical mailing list