OpenWRT - No Samba R/W access to internal HDD.

Discussion in 'ZIDOO X10' started by dodgetimmy, Jul 14, 2018.

  1. dodgetimmy

    dodgetimmy New Member

    After struggling to find out how to enable write access within Android outside of the each apps data folder I have now discovered there is a problem with the built in OpenWRT SAMBA client and writing to the internal HDD.

    These problems do not exist when I test the same SAMBA script with an external flash drive.

    I am trying to get full write access via my windows PC but when I try to write on Windows I receive an error "permission not granted by root"

    I have tried to overcome this by logging in as user "root" but still permissions are denied.

    There is a wealth of information on this forum including the guides sticky which I have already read (setup video and tweaks) but nothing that allows write access to the internal HDD.

    Has anyone overcome this with any hidden settings or permissions I can set?

    I honestly can't believe Zidoo release the X10 with such issues writing to internal HDD both in android and OpenWRT. If I would have known I may as well have invested in a cheaper box and a separate NAS!

    [​IMG]
    Thanks
     
    Last edited: Jul 14, 2018
  2. dodgetimmy

    dodgetimmy New Member

    I found the issue.
    Firstly the problem is linux permissions, anything I was trying to remove from the internal HDD that was created by the android part of the system and to OpenWRT belonged to the user: root.
    Because the default config for Samba includes:
    Code:
    invalid users = root
    it stops you from logging in to the share as root. For some reason even though guest access should have writable access in the samba config, it doesn't, because everything was created by root and can only be altered by root as a result.

    I solved it by changing the samba config line to
    Code:
    invalid users = none
    , and choosing to log in with the credentials user: root pass: root.

    But, and a pretty big but. Even though root is the owner of the folders/files it is not a valid SAMBA user (Zidoo didn't enable it).

    So you have to SSH to OpenWRT and use the samba utility
    Code:
    smbpasswd
    to create a new samba user. You need a new samba user to already be a linux user and you can't use a different linux user unless they are root or you won't have access to files/directories the android system populates.

    so
    Code:
    smbpasswd -a root
    creates a new Samba user linking the linux user, root.

    It will ask you for a password.
    You set the password and use that password to log in to the share remotely. I set it to root.

    So my credentials are user: root pass: root

    What a mess Zidoo left OpenWRT in, its like they bolted it on with no means to make it work together with android.
    To have this problem and also have problems with android writing to the internal HDD is frankly a disgrace.
     
  3. tiduspk

    tiduspk New Member

    Seeing some weird stuff about copying files to internal hdd. Is it ok to copy stuff like photos and home made videos through USB drive to internal hdd without any issue?
     
    Last edited: Jul 16, 2018
  4. dodgetimmy

    dodgetimmy New Member

    It depends what you use. Many applications in android work by default as they are programmed to comply with Android documents.

    If you are planning however to use an application that doesn't support documents and relies on permissions to directly write then you will have problems.

    Part of the issue is the box is still only Android 6 whilst many applications are written for 7 and 8 now and new changes.

    With OpenWRT as seen with my struggles above you can overcome the issue of not being able to write with samba to the internal HDD but you will only have the same issues as me if you are trying to alter contents on the internal HDD created by Android.

    Basic answer is no, there shouldn't be a problem just copying stuff using USB and the built in apps.
     
    tiduspk likes this.

Share This Page