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

[6.0.4] Share external mount in CentOS #10045

Closed
ser72 opened this issue Jul 30, 2014 · 7 comments
Closed

[6.0.4] Share external mount in CentOS #10045

ser72 opened this issue Jul 30, 2014 · 7 comments

Comments

@ser72
Copy link

ser72 commented Jul 30, 2014

Expected Behavior
Files are shared without error

Actual Behavior
When going to link, error appears, when share with user, nothing happens

NOTE
This occurs on CentOS Linux!!!

Steps

  1. Configure ownCloud on CentOS
  2. Create an external share for a user
    In this example it was done under the Personal page
    An SFTP mount to a Linux machine (tested both CentOS Linux and Ubuntu Linux as SFTP server -- both exhibited the issue)
  3. Place a file in the SFTP mount
  4. Share as link
  5. Navigate to the link
    Following error appears

error

  1. Share file with a different user
  2. Login as that user and attempt to view file.
    When select file in the Shared folder, nothing happens

LOGS

{"app":"PHP","message":"Undefined index:  at \/var\/www\/html\/owncloud604\/apps
\/files_sharing\/lib\/sharedstorage.php#76","level":3,"time":"2014-07-30T10:53:5
0+00:00"}
{"app":"PHP","message":"Call to a member function getMountPoint() on a non-objec
t at \/var\/www\/html\/owncloud604\/apps\/files_sharing\/lib\/sharedstorage.php#
76","level":3,"time":"2014-07-30T10:53:50+00:00"}
{"app":"PHP","message":"Undefined index:  at \/var\/www\/html\/owncloud604\/apps
\/files_sharing\/lib\/sharedstorage.php#76","level":3,"time":"2014-07-30T10:53:5
1+00:00"}
{"app":"PHP","message":"Call to a member function getMountPoint() on a non-objec
t at \/var\/www\/html\/owncloud604\/apps\/files_sharing\/lib\/sharedstorage.php#
76","level":3,"time":"2014-07-30T10:53:51+00:00"}
{"app":"PHP","message":"Undefined index:  at \/var\/www\/html\/owncloud604\/apps
\/files_sharing\/lib\/sharedstorage.php#76","level":3,"time":"2014-07-30T10:53:5
9+00:00"}
{"app":"PHP","message":"Call to a member function getMountPoint() on a non-objec
t at \/var\/www\/html\/owncloud604\/apps\/files_sharing\/lib\/sharedstorage.php#
76","level":3,"time":"2014-07-30T10:53:59+00:00"}
{"app":"PHP","message":"Undefined index:  at \/var\/www\/html\/owncloud604\/apps
\/files_sharing\/lib\/sharedstorage.php#76","level":3,"time":"2014-07-30T10:54:0
0+00:00"}
{"app":"PHP","message":"Call to a member function getMountPoint() on a non-objec
t at \/var\/www\/html\/owncloud604\/apps\/files_sharing\/lib\/sharedstorage.php#
76","level":3,"time":"2014-07-30T10:54:00+00:00"}

Tests

  1. Tested with ownCloud on Ubuntu server and could not reproduce
  2. Tested with oC on Ubuntu server and CentOS as SFTP server -- could not reproduce
  3. Tested with oC on CentOS and CentOS as SFTP server -- BROKEN
  4. Tested with oC on CentOS and Ubuntu as SFTP server -- BROKEN
@butonic butonic self-assigned this Aug 1, 2014
@ser72
Copy link
Author

ser72 commented Aug 5, 2014

@butonic Any updates?

@butonic butonic added this to the 2014-sprint-01-current milestone Aug 5, 2014
@butonic
Copy link
Member

butonic commented Aug 8, 2014

CentOS is heavily using SELinux. By default it prevents apache to open new network connections, resulting in an owncloud log entry like

{"reqId":"53c0344d850ae","app":"PHP","message":"Cannot connect to hostname.tld. Error 13. Permission denied at \/var\/www\/html\/owncloud\/apps\/files_external\/3rdparty\/phpseclib\/phpseclib\/Net\/SSH2.php#807","level":3,"time":"2014-07-11T19:00:29+00:00","method":"POST","url":"\/owncloud\/index.php\/apps\/files_external\/ajax\/addMountPoint.php"}

To fix that, as root execute

$ setsebool -P httpd_can_network_connect=1

see http://stackoverflow.com/questions/24537090/unable-to-connect-with-net-ssh2-from-inside-apache

@butonic
Copy link
Member

butonic commented Aug 8, 2014

Closing as won't fix, because this is well documented CentOS behaviour.

@butonic butonic closed this as completed Aug 8, 2014
@ser72
Copy link
Author

ser72 commented Aug 8, 2014

@butonic:

Entered the above command and still have the issue.

Logs:


[root@ser-centos data]# more owncloud.log
{"reqId":"53e4c36ec6887","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path '
files_trashbin\/files' is not readable !!!","level":0,"time":"2014-08-08T12:32:4
6+00:00","method":"GET","url":"\/owncloud604\/index.php\/apps\/files"}
{"reqId":"53e4c37a362d8","app":"share","message":"could not resolve linkItem","l
evel":0,"time":"2014-08-08T12:32:58+00:00","method":"GET","url":"\/owncloud604\/
public.php?service=files&t=68fca666e757a84fe739f102d33bea74"}

@ser72 ser72 reopened this Aug 8, 2014
@butonic
Copy link
Member

butonic commented Aug 8, 2014

@ser72 and I cannot reproduce the issue in OC7. Seems the sharing overhaul also fixed this issue.

@butonic butonic added the v6.x label Aug 8, 2014
@butonic
Copy link
Member

butonic commented Aug 8, 2014

I can reproduce the issue in OC6.0.4 on debian.

@butonic
Copy link
Member

butonic commented Aug 8, 2014

Issue already described in #8167 (comment)
Has been fixed by @Xenopathic in #9635 for stable6, which was merged 24days ago. And I can confirm stable6 HEAD is fixed.

closing as duplicate

@butonic butonic closed this as completed Aug 8, 2014
@lock lock bot locked as resolved and limited conversation to collaborators Aug 17, 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

2 participants