stat failed with mounted share clean install 6.0.2

Ask all your questions regarding OC 6.x Please read the Support Forum Rules
Forum rules
Before you post; make sure you are using at least PHP Version 5.3.x - Also read Support Forum - Read this before posting

stat failed with mounted share clean install 6.0.2

Postby chrisryder » Tue Mar 04, 2014 1:36 pm

I just installed the latest 6.0.2 on a centos 6 server
CentOS release 6.5 (Final)
Apache/2.2.15 (CentOS)
php version 5.4.25
mysql 5.5.36
the tools.php show everything as it should be.

I can mount an external share in the fstab

\\iicarus\Drobo /mnt/Drobo cifs credentials=/root/credentials.txt,_netdev,uid=apache,gid=apache,file_mode=0777,dir_mode=0777 0 0

This works fine and I can access the files and read and write here but I cannot add this as a local I get a red square in the gui

I can also access the drive using smbclient so I assume the credentials/access rights are correct

when I try and use the opencloud external mount SMB is also get a red square

This is the mount.json the gui creates

{"user":{"all":{"\/$user\/files\/Drobo":{"class":"\\OC\\Files\\Storage\\SMB","options":{"host":"iicarus","user":"XXXX","password":"XXXX","share":"Drobo","root":""}},"\/$user\/files\/mnt":{"class":"\\OC\\Files\\Storage\\Local","options":{"datadir":"\/mnt\/Drobo"}}}}}

I have removed the user and password of course

The following errors appear in the log

Error PHP stat(): stat failed for /mnt/Drobo/ at /var/www/html/owncloud/lib/private/files/storage/local.php#82 2014-03-04T12:26:54+00:00
Error PHP stat(): stat failed for smb://xxx:xxx@iicarus/Drobo/ at /var/www/html/owncloud/apps/files_external/lib/smb.php#65 2014-03-04T12:26:54+00:00

what am I doing wrong? as far as I can see I have followed all the recommendations in the documentation (what little there is ) and the examples I could find in the forums (which are all old versions) but it does not work for me :cry:

Any help would be appreciated
chrisryder
Newbie
 
Posts: 2
Joined: Tue Mar 04, 2014 11:46 am
ownCloud version: 6.0.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.4.25

Re: stat failed with mounted share clean install 6.0.2

Postby msmith9xr4 » Wed Mar 05, 2014 5:30 pm

same issue, similar system, new clean centos 6.5. installed 6.0.1 didn't work, 6.0.2 updated today, no help

Can mount fine from shell using the recommended test syntax below to linux NAS box samba 3.0.37 and windows 7 machine. Few mroe errors to the windows machine but I get connected with no problem.

smbclient -N -U 'USER%PASSWORD' -O 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -O 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -L '192.168.5.5'
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.37]

Sharename Type Comment
--------- ---- -------
_NAS_Picture_ Disk
iTunes_music Disk
Movie Disk
USBCopy Disk
USBHDD Disk Used for external USB HDDs only.
NAS_Public Disk
_NAS_Module_Source_ Disk
BKP Disk
DVD_Concerts Disk DVD format and other concert video
IPC$ IPC IPC Service (N4100EVO)
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.37]

Server Comment
--------- -------
MATTHOME
MCE-LR
N4100EVO N4100EVO
VIX2

Workgroup Master
--------- -------
WORKGROUP N4100EVO


AND WINDOWS:
smbclient -N -U 'username%password' -O 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -O 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -L '192.168.5.32'
Domain=[VIX2] OS=[Windows 7 Ultimate 7600] Server=[Windows 7 Ultimate 6.1]

Sharename Type Comment
--------- ---- -------
00IN Disk
00_IN Disk
00_MUSIC Disk
00_Pictures Disk
0HD_3 Disk
0_DOCS Disk
0_HD Disk
0_HD2 Disk
ADMIN$ Disk Remote Admin
Apps Disk
C$ Disk Default share
D$ Disk Default share
Downloads Disk
F$ Disk Default share
IPC$ IPC Remote IPC
L Disk
Movies Disk
PAT Disk
print$ Disk Printer Drivers
Q$ Disk Default share
R$ Disk Default share
scan Disk
T$ Disk Default share
torrents Disk
TV Disk
U$ Disk Default share
Users Disk
W$ Disk Default share
session request to 192.168.5.32 failed (Called name not present)
session request to 192 failed (Called name not present)
session request to *SMBSERVER failed (Called name not present)
NetBIOS over TCP disabled -- no workgroup available



But I just get that same

Error PHP stat(): stat failed for smb://xxx:xxx@192.168.5.5/NAS_Public/ at /var/www/html/owncloud/apps/files_external/lib/smb.php#65
msmith9xr4
Newbie
 
Posts: 7
Joined: Wed Mar 05, 2014 5:22 pm
ownCloud version: 6.0.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.5.9

Re: stat failed with mounted share clean install 6.0.2

Postby msmith9xr4 » Wed Mar 05, 2014 6:06 pm

Ok figured it out, same problem prevented sending mail - any outgoing connections from httpd were blocked I guess.

It is touched upon in the docs somewhere to look at SELinux.

Anyway I ran
Code: Select all
setsebool -P httpd_can_network_connect 1


and now all good.
msmith9xr4
Newbie
 
Posts: 7
Joined: Wed Mar 05, 2014 5:22 pm
ownCloud version: 6.0.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.5.9

Re: stat failed with mounted share clean install 6.0.2

Postby chrisryder » Wed Mar 05, 2014 6:38 pm

msmith9xr4 wrote:Ok figured it out, same problem prevented sending mail - any outgoing connections from httpd were blocked I guess.

It is touched upon in the docs somewhere to look at SELinux.

Anyway I ran
Code: Select all
setsebool -P httpd_can_network_connect 1


and now all good.


You are a genius. That was the problem. I could not find it in the manuals but that command is a mandatory part of the install if you want to connect to anything other than local.

Thank you very much indeed for posting the solution :D
chrisryder
Newbie
 
Posts: 2
Joined: Tue Mar 04, 2014 11:46 am
ownCloud version: 6.0.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.4.25

Re: stat failed with mounted share clean install 6.0.2

Postby msmith9xr4 » Thu Mar 06, 2014 7:17 pm

glad it helped.

If you get SSL working without warnings let me know.

viewtopic.php?f=14&t=15122
msmith9xr4
Newbie
 
Posts: 7
Joined: Wed Mar 05, 2014 5:22 pm
ownCloud version: 6.0.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.5.9

Re: stat failed with mounted share clean install 6.0.2

Postby oliverweidel » Sat Aug 16, 2014 5:59 pm

Thanks for the solution. The error is still here:

CentOS 6.5, OwnCloud 7.0.1
oliverweidel
Newbie
 
Posts: 1
Joined: Sat Aug 16, 2014 5:57 pm
ownCloud version: 7.0.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.3.3


Return to ownCloud Community Edition 6.x

Who is online

Users browsing this forum: Bing [Bot] and 16 guests