Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External Storage Mount SMB did not work #290

Closed
xtruthx opened this issue Nov 6, 2012 · 18 comments
Closed

External Storage Mount SMB did not work #290

xtruthx opened this issue Nov 6, 2012 · 18 comments

Comments

@xtruthx
Copy link

xtruthx commented Nov 6, 2012

I tried to create a Mountpoint with SMB and i run in errors in serveral ways.

So my installation is an SLES 11 SP2 x64 with owncloud2012 4.5 enterprise.

Here is my mount.php:

<?php return array ( 'user' => array ( 'admin2' => array ( '/$user/files/SMB' => array ( 'class' => 'OC_Filestorage_SMB', 'options' => array ( 'host' => 'server', 'user' => 'user', 'password' => 'password', 'share' => '/testsmb', 'root' => '/srv/www/htdocs/owncloud/data/smb/', ),), ), ), ); ?>

And this is the error i got:

[Tue Nov 06 16:49:17 2012] [error] [client 10.10.10.10] PHP Warning: stat(): stat failed for smb://user:password@server/testsmb/srv/www/htdocs/owncloud/data/smb/ in /srv/www/htdocs/owncloud/apps/files_external/lib/smb.php on line 57, referer: https://cloudy.server/settings/admin.php

If i check the connection for smbclient manually it works fine. ( for example: sbmclient -L HOST -U USER works).

Update:

If i tried it with other values for root like smb/ or / i got an http 500 error.

Additional:

The Timestamp of the folder which appears in files has a timestamp from 1.January.1970 and so on, and it is noch accessable.

@DeepDiver1975
Copy link
Member

@icewind1991 can you please have a look? THX

@icewind1991
Copy link
Contributor

The root configuration option is not a local path, but a folder in the smb share that is mounted

@xtruthx
Copy link
Author

xtruthx commented Nov 7, 2012

OK now its functional, i m sorry for that. So i missed this during reading the documentation, so at least you wrote optional you can use the "/" for the root. If i use / for root i got an HTTP 500 Error for the hole Frontend. I mentioned it in the first post.

Additional:

It seems that it not work correct for me in anyway, i ma sorry about that. So mybe another handling error?

  1. If enter the smb folder in the files section and start a upload about a 18 KB sized .txt it appears in the smb share on the windows server, but the upload process dont stop. After a leaving the folder i got an HTTP 500 error for the frontend after entering the smb-share folder
    2 After Deleting the deleting the file on the windows server the 500 error disappear.
  2. The same thing occure in the other direction. If you put a file in the share on the server you cant enter the smb folder in the webfrontend under regarding a 500 error.

Here is the log for an upload:
10.10.10.10- - [07/Nov/2012:18:01:36 +0100] "POST /core/ajax/translations.php HTTP/1.1" 200 3349 "https://cloudy.server/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4"
10.10.10.10. - - [07/Nov/2012:18:01:37 +0100] "GET /core/img/loading.gif HTTP/1.1" 200 1849 "https://cloudy.server/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4"
10.10.10.10. - - [07/Nov/2012:18:01:37 +0100] "POST /?app=files&getfile=ajax%2Fupload.php HTTP/1.1" 500 - "https://cloudy.server/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4"

@xtruthx
Copy link
Author

xtruthx commented Nov 16, 2012

Hi,

im sorry for this push, but i really need an answer if this a user error or an application error. In both cases it would be nice if someone can give me hint for the solution.

Thx

Update:

Hey there! What about the error i mentoined above. I cant finish a upload in the webfrontend it runs without a end, but the file completly appears in the shard folder on the windows server after leavining the site i m not in the possition to access the folder again an run into a blank page.

@blizzz
Copy link
Contributor

blizzz commented Nov 27, 2012

@icewind1991 any idea?

@icewind1991
Copy link
Contributor

Is there anything in the apache error log or owncloud error log after you try and upload a file.

Also can you try running
smbclient -N -U user%password -d 0 //host/share -c dir
after the file is uploaded and the web interface gives the error

@MTRichards
Copy link
Contributor

I am having a similar problem trying to get this to work on openSUSE 12.2, 4.5.4. a similar error message appears, and nothing shows up in the smb folder on ownCloud.

@xtruthx
Copy link
Author

xtruthx commented Dec 4, 2012

Here the log files:

==> owncloud.local_log <==
10.99.20.46 - - [04/Dec/2012:08:06:36 +0100] "GET /?app=files&dir=//SMB HTTP/1.1" 200 8577 "https://cloudy.local/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11"
10.99.20.46 - - [04/Dec/2012:08:06:37 +0100] "GET /remote.php/core.css HTTP/1.1" 304 - "https://cloudy.local/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11"
10.99.20.46 - - [04/Dec/2012:08:06:37 +0100] "GET /?app=files&getfile=css%2Ffiles.css HTTP/1.1" 304 - "https://cloudy.local/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11"
10.99.20.46 - - [04/Dec/2012:08:06:38 +0100] "GET /remote.php/core.js HTTP/1.1" 304 - "https://cloudy.local/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11"
10.99.20.46 - - [04/Dec/2012:08:06:38 +0100] "GET /core/img/breadcrumb.svg HTTP/1.1" 200 2468 "https://cloudy.local/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11"
10.99.20.46 - - [04/Dec/2012:08:06:38 +0100] "GET /cron.php HTTP/1.1" 200 20 "https://cloudy.local/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11"
10.99.20.46 - - [04/Dec/2012:08:06:38 +0100] "POST /core/ajax/translations.php HTTP/1.1" 200 321 "https://cloudy.local/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11"
10.99.20.46 - - [04/Dec/2012:08:06:38 +0100] "GET /core/ajax/share.php?fetch=getItemsSharedStatuses&itemType=file HTTP/1.1" 200 30 "https://cloudy.local/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11"
10.99.20.46 - - [04/Dec/2012:08:06:38 +0100] "GET /?app=files&getfile=ajax/scan.php&checkonly=true HTTP/1.1" 200 42 "https://cloudy.local/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11"
10.99.20.46 - - [04/Dec/2012:08:06:38 +0100] "GET /core/img/breadcrumb.png HTTP/1.1" 200 320 "https://cloudy.local/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11"
10.99.20.46 - - [04/Dec/2012:08:06:50 +0100] "POST /core/ajax/translations.php HTTP/1.1" 200 3348 "https://cloudy.local/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11"
10.99.20.46 - - [04/Dec/2012:08:06:50 +0100] "GET /core/img/loading.gif HTTP/1.1" 200 1849 "https://cloudy.local/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11"
10.99.20.46 - - [04/Dec/2012:08:06:50 +0100] "POST /?app=files&getfile=ajax%2Fupload.php HTTP/1.1" 500 - "https://cloudy.local/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11"
10.99.20.46 - - [04/Dec/2012:08:06:59 +0100] "GET /core/img/actions/history.svg HTTP/1.1" 200 7330 "https://cloudy.local/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11"
10.99.20.46 - - [04/Dec/2012:08:07:16 +0100] "GET /?app=files_versions&getfile=ajax/getVersions.php&source=%2FSMB%2F1722_4.jpg HTTP/1.1" 200 - "https://cloudy.local/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11"
10.99.20.46 - - [04/Dec/2012:08:07:26 +0100] "GET /?app=files&getfile=ajax/rename.php&dir=%2FSMB&newname=test.jpg&file=1722_4.jpg HTTP/1.1" 200 61 "https://cloudy.local/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11"
10.99.20.46 - - [04/Dec/2012:08:07:27 +0100] "POST /core/ajax/translations.php HTTP/1.1" 200 3434 "https://cloudy.local/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11"
10.99.20.46 - - [04/Dec/2012:08:07:27 +0100] "GET /core/img/actions/delete.png?2012-11-26T19:08:20Z HTTP/1.1" 200 240 "https://cloudy.local/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11"
10.99.20.46 - - [04/Dec/2012:08:11:20 +0100] "GET /?app=files&dir=%2FSMB HTTP/1.1" 500 - "https://cloudy.local/?app=files&dir=//SMB" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11"
10.99.20.46 - - [04/Dec/2012:08:11:22 +0100] "GET /favicon.ico HTTP/1.1" 404 1160 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11"

Here ist the output of smbclient:

Domain=[AD] OS=[Windows Server 2008 R2 Enterprise 7600] Server=[Windows Server 2008 R2 Enterprise 6.1]
. D 0 Wed Nov 7 17:41:43 2012
.. D 0 Wed Nov 7 17:41:43 2012
test D 0 Tue Dec 4 08:09:55 2012

    48947 blocks of size 524288. 27698 blocks available

@DeepDiver1975
Copy link
Member

@xtruthx Do the file names in your SMB share contain non ascii characters? This is an open issue at the moment.

@DeepDiver1975
Copy link
Member

@MTRichards I believe your issue has been fixed with #290

@MTRichards
Copy link
Contributor

Excellent. I will test in tonight's stable build

@DeepDiver1975
Copy link
Member

@MTRichards it's not yet merged - stay tuned THX

@MTRichards
Copy link
Contributor

ok, then I won't test yet.

@xtruthx
Copy link
Author

xtruthx commented Dec 6, 2012

ok thank you. And no there are no ascii characters in the file names. i will test it manually tomorrow morning.

@blizzz blizzz closed this as completed in 09115c3 Dec 14, 2012
@DeepDiver1975
Copy link
Member

@MTRichards @xtruthx
we have these fixes merged now to stable45.
For testing use this archive: https://github.com/owncloud/core/archive/stable45.zip

@MTRichards
Copy link
Contributor

great. I will try tomorrow.with stable daily. thanks!

@xtruthx
Copy link
Author

xtruthx commented Dec 21, 2012

i had a first look on it. Great it works! I will perfom more test on the next week, for now all looks fine.

@ostasevych
Copy link

I found another problem. I can create folders and subfolders in a share, but I cannot create a file and remove folders/subfolders. Using owncloud-5.0 on Centos 6.4 x86_64.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants