Setting Up Local (Same Server SMB Share)


#1

Hello Everyone! I"m new to the Linux Homelab Environment. It’s been one heck of a learning curve for me, but things have come along. I’m needing help with setting up My own (local) SMB External Share.
No matter what i do, i get a red Dot and OC will not connect to it. I have a feeling i’m missing something simple here… It’s been that way the whole way but, I cannot find the exact answer i’m looking for in the manual, online, how to’s, etc.

If my Samba Server and Share(s) are located on the same server as OC, what do i put for the URL?
I would understand an IP address if it’s a remote/OFF server share but, if they’re (OC and Samba server) both on the same server?

I have a raid 10 mounted to a Folder, which is then shared to my home network with Samba for Windows machines to connect. I want to connect this specific share to OC so i can reach it when away from home.

Sambe Share “Pictures”
Raid 10 mount: /Raid-Array Folder

Will update config files once i get home. I apologize if i lack enough information at this exact time. Thanks in advance for any/everyone’s help!

C-los

–>

Steps to reproduce

  1. Login as OC Login through Web Portal
    2.During Setup of External SMB Storage

Expected behaviour

Connect same Server SMB Share to Owncloud for Remote access.
(i.e., My ubuntu server (Dell R710) has OS, Samba Server and OC (including LAMP structure) All in the same place/server)

Actual behaviour

Always get a red dot for connection to Share.

Server configuration

Ubuntu 18.04.01 LS

Web server:
Apache
Database:
MySQL
PHP version:
7.2 (Comes with Ubuntu 18.04.01 LTS)
ownCloud version: (see ownCloud admin page)
Latest 10.0.10
Updated from an older ownCloud or fresh install:
Fresh Install using these instructions/guides

Where did you install ownCloud from:
APT-Get packages per above guide

Will update below when i get home<<<

Signing status (ownCloud 9.0 and above):
Self Signed Certificate per guide above

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

The content of config/config.php:

{
    "basic": {
        "license key": "***REMOVED SENSITIVE VALUE***",
        "date": "Fri, 28 Dec 2018 04:04:04 +0000",
        "ownCloud version": "10.0.10.4",
        "ownCloud version string": "10.0.10",
        "ownCloud edition": "Community",
        "server OS": "Linux",
        "server OS version": "Linux titan 4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018 x86_64",
        "server SAPI": "apache2handler",
        "webserver version": "Apache\/2.4.29 (Ubuntu)",
        "hostname": "10.0.10.10",
        "logged-in user": "anonymous"
    },
    "stats": {
        "users": {
            "Database": {
                "count": 4,
                "seen": 3,
                "logged in (30 days)": 3
            }
        },
        "groups": {
            "OC\\Group\\Database": 2
        }
    },
    "config": {
        "updatechecker": false,
        "instanceid": "ocrbxowcl8l9",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "10.0.10.10"
        ],
        "datadirectory": "\/var\/www\/owncloud\/data",
        "overwrite.cli.url": "https:\/\/10.0.10.10",
        "dbtype": "mysql",
        "version": "10.0.10.4",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_smtpauthtype": "PLAIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "files_external_allow_create_new_local": "true"
    },
    "integritychecker": {
        "passing": true,
        "enabled": true,
        "result": []
    },
    "core": {
        "allow_user_mount_sharing": "yes",
        "enable_external_storage": "yes",
        "first_install_version": "10.0.10.4",
        "installedat": "1545562952.922",
        "lastcron": "1545969838",
        "lastupdateResult": "[]",
        "lastupdatedat": "1545969807",
        "public_files": "files_sharing\/public.php",
        "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
        "shareapi_allow_social_share": "no"
    },
    "apps": [
        {

List of activated apps:
External Storage

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder.

Are you using external storage, if yes which one: local/smb/sftp/…
Yes Local/Same Server Samba Storage
Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your ownCloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser
Chrome

Operating system:
Windows 10


#3

Try localhost, or 127.0.0.1 as IP-Address.


#4

Another newbie question here. I searched and read all I could find but have not been able to solve my situation. If I started a new thread it would have the same header so I thought it best to pile onto this one. :slight_smile:

Here is my scenario. I have the UCS appliance version of OC running in a VirtualBox VM on a Windows 10 Pro host. I am trying to have OC use a hard drive on the host as its storage location so those files are accessible on the local host PC outside of OC. From the various topics and guides I have read there is no concrete answer to this scenario but there are lots of folks struggling with various versions. I have tried most of the suggestions found in those posts but since none are for this specific configuration when they don’t work I can’t tell why.

I thought maybe it would be good to start from scratch and get some guidance from the gurus here. Kind of an idiot’s guide to setting up SMB shares on the same server with the appliance version of OC. Is anyone game to lay out the step by step so I can try it? We may be able to create something others can use. :wink: Cheers and thanks in advance!


#5

I feel you, I had the exact same problem. I managed to find a way to solve it:

post #2

TL;DR: let’s say you shared a folder called “Data” from Windows 10:

Name : whatever you want
Host : 192.168.x.x (the windows 10 local IP; cmd; ipconfig)
Share : Data (!)
Subfolder :
Domain : whatever you want but not empty
User : BlackBird
Passwork : ******


#6

Green Dot! Thanks Carlisle. It turns out I was very close. In the OC settings I was using “Log in credentials, save in session” rather than “username and password”. And my Domain was blank. I also checked full access for the selected user in the Windows share dialog, not sure if you did that on yours or not.

Now I have 4TB (raid) of hard drive available in OC. The plan is to put all our media there so it can be accessed by everyone on mobile. Music, movies, pictures etc all in one place. I can manage the media from the main PC (also OC server) and no one has to keep local copies. Let the games begin!

Thanks for the guidance!


#7

Apparently it’s not needed anymore. There was a mod that recommended to enable full control for the windows shares:

but I found out it works even without, and I suggest you to disable full control for that share & user, otherwise the files could be modified/deleted on owncloud and you would lose them also from your HDD. I decided to give read-only authorization, which is the best choice in my opinion, so my files can’t be deleted.
You could share a particular folder (e.g. Public) with read/write permissions so you have a folder editable but your other shares are safe.

Also, don’t forget to enable encryption (masterkey; you find it in the server options) and generate SSL certificates: either on your own (but they will be flagged as unsafe) or from a provider, which you have to pay for or for free (eg https://letsencrypt.org/ ). We tend to forget it, but once you are “out in the open” there are threats and dangers. If you want to access your owncloud server from different clients on different networks, they’ll most likely get blocked as “untrusted domains”: add their IPs to your config.php trusted domains or add your public IP address to the trusted domains in the config.php to prevent the “untrusted domain” page to show up.