Kodi Community Forum
AFTV: Cannot Write to Windows SMB share - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Android (https://forum.kodi.tv/forumdisplay.php?fid=164)
+---- Thread: AFTV: Cannot Write to Windows SMB share (/showthread.php?tid=220225)

Pages: 1 2 3


AFTV: Cannot Write to Windows SMB share - DruTheFu - 2015-03-03

Current setup:
(Qty 2) Amazon Fire TV box
Kodi v14.2
Skin: Arctic - Zephyr
Shared Libraries via MySQL
Path Substitution for \Thumbnails directory (to reduce storage demands on AFTV)
SMB sources to my Win 8.1 machine


I am having quite a time with my current major issue, that I think is the underlying root of my other reported 'issues'.

In a short history, I attempted to use the Backup add-on to no avail, receiving a message from Kodi that the drive is write protected. It struck me odd that this addon would complain about smb drive write protection, but still be able to create directories on the smb share, but no any files....so just a ton of empty folders. I tried many things trying to get this to work, believing it has something to do with the way my sharing and permissions were set up. I followed the Kodi Wiki guide (Kodi SMB/Windows), along with a wide array of other possibilities I found on Google and in this forum. Nothing seemed to work, so I gave up pursuing this effort, as I was still able to connect from my Win8.1 machine to my AFTV via the Fire Utility App v0.38, and successfully Backup my settings via the adb console.

Fast forward to now, months later, and my AFTV is beginning to run low on disk space, and I look into implementing Path Substitution of the device's Thumbnails directory so that I can reclaim some storage space from the AFTV. After getting this now configured according to Kodi Wikis and forum posts, it appears that Kodi successfully binds the "<from> - <to>" pair (according to the logs), but is unable to write files. Again, like the Backup addon, this process can successfully create folders on the destination smb share, but it does not create/copy files from the AFTV to the smb share.


Some things I've done/tried:
  • Believing that it was actually a user credential issue on my Windows 8.1 machine, I went ahead and created a whole new account in Windows, making sure to not include any spaces in the username (my primary account contains a space, and I thought that may have been the original culprit). I correctly setup sharing and applied the proper permissions of this new account to the directories. I have applied 'Full Control' permissions for this newly created account, as well as 'Everyone', to both the Share permissions and the file/folder security permissions.

  • I've enabled the 'Guest' account on my Windows machine.

  • I've tried the process after completely turning off the Windows Firewall.

  • I've completely cleared ALL my Window's machines Sharing permissions, and started over Sharing from scratch.

  • I've checked:
    Control Panel - Administrative Tools - Local Security Policy - Local Policies - Security Options

    Network security: LAN Manager authentication level
    Send LM & NTLM responses

    Minimum session security for NTLM SSP
    Disable Require 128-bit encryption

  • I've installed the 'ES File Explorer' app onto my Fire TV. Using the credentials of the new account, I am able to successfully connect to the exact same directory that my backups would be transferring to via the Backup add-on, as well as the Thumbnails directory. I am also able to write and overwrite files in both directions. This leads me to believe that my permissions and credentials are intact.

  • Now having the ability to copy files back and forth, I've been able to inspect my 'passwords.xml' and 'sources.xml' files in my Kodi \userdata folder. The content in these files correctly reflect the proper credentials and smb paths.

  • Using the 'Fire TV Utility App' on my workstation, I am able to successfully run its backup feature to transfer the same files from the AFTV Kodi installation to my workstation.


It is very odd to me that I can moves files back in forth from my Windows machine and the AFTV outside of Kodi, using the native AFTV apps (like ES File Explorer), while any Kodi addons/programs cannot transfer files.

It also puzzles me that these same Kodi addons/programs complain of smb drive write protection, yet are able to create new directories on the Windows machine, but fail to create/transfer any files to that Windows machine. This has occurred for me using at least 2 Kodi addons I'm aware of (Backup, Artwork Downloader).

Some examples of the contents of the kodi.log file are:
Quote:ERROR: static bool XFILE::CFile::Copy(const CURL&, const CURL&, XFILE::IFileCallback*, void*) - Failed write to file smb://192.168.79.100/Pixar/extrafanart/rrAdTMAH41reM6HKJDdu3HpW2Lf.jpg

Quote:ERROR: static bool XFILE::CFile::Copy(const CURL&, const CURL&, XFILE::IFileCallback*, void*) - Failed write to file smb://BATCOMPUTER/AmazonFireTV/KodiBackups/Main/201503022359/xbmcbackup.val

Quote:00:16:27 T:1725350960 WARNING: SMBFile::OpenForWrite() called with overwriting enabled! - smb://USERNAMETongue[email protected]/Movies/extrathumbs/thumb2.jpg
00:16:27 T:1725350960 ERROR: static bool XFILE::CFile::Copy(const CURL&, const CURL&, XFILE::IFileCallback*, void*) - Failed write to file smb://192.168.79.100/Movies/extrathumbs/thumb2.jpg
00:16:27 T:1725350960 DEBUG: CSMBFile::Close closing fd 10000

Sorry for the long post, but I am grasping for straws now. I'm running out of ideas and would appreciate any additional suggestions.


RE: AFTV: Cannot Write to Windows SMB share - wsnipex - 2015-03-03

if you go the systems - file manager, then navigate to the smb share: Can you create/copy/delete files/directories?
please provide a full Debug Log of the above.


RE: AFTV: Cannot Write to Windows SMB share - DruTheFu - 2015-03-03

I was able to successfully create new folders, but unable to 'copy' and 'move' individual files from the AFTV to my Windows machine:

Link to Log


RE: AFTV: Cannot Write to Windows SMB share - dr.joaomarcelo - 2015-03-03

I had this problem with smb using windows 8.1. The biggest problem was actually not being able to save the subtitles to the movie folder. I tried everything like you did and in the end i gave up and started using NFS for sharing my files. This way i have no more issues.

Seems like an issue with kodi android version and windows smb, perhaps only windows 8. I have no issues with kodi running in another windows machine.


RE: AFTV: Cannot Write to Windows SMB share - DruTheFu - 2015-03-03

(2015-03-03, 19:09)dr.joaomarcelo Wrote: I had this problem with smb using windows 8.1. The biggest problem was actually not being able to save the subtitles to the movie folder. I tried everything like you did and in the end i gave up and started using NFS for sharing my files. This way i have no more issues.

Seems like an issue with kodi android version and windows smb, perhaps only windows 8. I have no issues with kodi running in another windows machine.


When originally adding my sources, I attempted to add a NFS source instead of via SMB, but I was not presented with any NFS drives to choose from, so went with the SMB route. Did you have to install a NFS client on your Windows machine? If I mount the Shares as NFS, will I lose the ability to leverage SMB as a fallback method?


RE: AFTV: Cannot Write to Windows SMB share - dr.joaomarcelo - 2015-03-04

(2015-03-03, 22:57)DruTheFu Wrote:
(2015-03-03, 19:09)dr.joaomarcelo Wrote: I had this problem with smb using windows 8.1. The biggest problem was actually not being able to save the subtitles to the movie folder. I tried everything like you did and in the end i gave up and started using NFS for sharing my files. This way i have no more issues.

Seems like an issue with kodi android version and windows smb, perhaps only windows 8. I have no issues with kodi running in another windows machine.


When originally adding my sources, I attempted to add a NFS source instead of via SMB, but I was not presented with any NFS drives to choose from, so went with the SMB route. Did you have to install a NFS client on your Windows machine? If I mount the Shares as NFS, will I lose the ability to leverage SMB as a fallback method?
I had to install hanewinnfs or something like that to use the NFS protocol in my windows machine.

I think you can use smb together just fine, but i havent tried myself.


RE: AFTV: Cannot Write to Windows SMB share - DruTheFu - 2015-03-04

wsnipex/Team Kodi,

Are there any other reports or known issues regarding Kodi/Android's ability to write to SMB sources on a Windows 8/8.1 machine via SMB? Are there any 'fixes' on the horizon, or is it recommended to implement 3rd party software on my Windows 8.1 Pro machine (only Enterprise edition can natively support NFS) to accomplish sources via NFS rather then SMB? Is NFS versus SMB the true fix for this issue?

Having Kodi installed on my AFTV worked like a charm while I was only hoping to accomplish Kodi on a single device, other than trying to write files from the Backup addon to a SMB source that I found a work around with using the Amazon Fire TV Utility App. But now that I have multiple AFTV's with Kodi installed, and am looking to share libraries via MySQL, and do path substitutions for the Thumbnails directory (to clear space from the limited onboard storage of the device) to the source destination, the ability to write to sources (specifically via SMB) is a key ingredient to my implementation's success.

I have a feeling that this underlying SMB write issue is the root to some of the issues I've been experiencing, and once I can get this figured out, there should be smooth sailing ahead for me.

Thanks for your help,

DtF


RE: AFTV: Cannot Write to Windows SMB share - wsnipex - 2015-03-04

well, I neither have win8.1 nor an AFTV, so I cannot test that myself.

do you have any other kodi install on android or any other platform? It be good to know if the same problem exists there as well.
Using NFS is certainly a viable workaround, but if this issue is a bug in kodi, we'd like to get it fixed.


RE: AFTV: Cannot Write to Windows SMB share - DruTheFu - 2015-03-04

Thanks for your attention and quick reply.

Unfortunately, the AFTV's are the only devices I have for use with Kodi. My ATV3's and PS3's are no use or help for me here.

I'm willing to ride this out with Team Kodi and help test in any way I can within my means. The wife is already shooting me down with evil stares and comments for the time I've been tinkering with this, but anything I can do on the under, I'm game....hahah Wink

Hopefully other users with similar setups can chime in and give their experiences.

Fingers crossed, holding my breath...


RE: AFTV: Cannot Write to Windows SMB share - da-anda - 2015-03-04

I can confirm the bug. Just tried to copy my database folder from my Android tablet to my Win8.1 share in the file explorer using todays nightly (kodi-20150303-170291a-master-armeabi-v7a.apk). It's creating folders but cancels operation on first file. Here is the related part of the debug log with component logging of SMB enabled: http://xbmclogs.com/p0brh4dwx

btw - SMB component logging was exposing the credentials of the share in the log file - I thought we fixed this already?


RE: AFTV: Cannot Write to Windows SMB share - DruTheFu - 2015-03-05

Looking at what it will take to convert my sources from SMB to NFS is going to take some time and patience on my part, specifically having to re-scrape my media libraries to my MySQL Db. If I take the time to pull the trigger and do it, I hope it corrects the issue I'm experiencing, otherwise it was all in vane.

I wonder what it will take to identify this bug/issue in the code, and how much time it will take to address in code.

Let me know if there's any help in testing I can assist with.


RE: AFTV: Cannot Write to Windows SMB share - Koying - 2015-03-05

Haven't I read somewhere in the forums that you have to do some registry tricks to allow smb from Kodi on win8?
Something about the way Windows handle security in recent releases that's not supported by our samba, IIRC.


RE: AFTV: Cannot Write to Windows SMB share - da-anda - 2015-03-05

@Koying - works just fine on a OE nightly. I'm not sure though which libsmb version they use


RE: AFTV: Cannot Write to Windows SMB share - Koying - 2015-03-05

3 vs 2 ?


RE: AFTV: Cannot Write to Windows SMB share - wsnipex - 2015-03-05

OE uses samba 3.6.25 vs our really old 3.0.17. The problem with newer samba is that it's GLPv3