Web-DAV/permission issues

help

#1

Hey all. I'm having a bit of an issue. I can't work out if there is a couple of things going on here or if it's one thing breaking everything. Hopefully one of you will know what's going wrong. Cheers.

Steps to reproduce
1. Install Owncloud. Copy ownclouddata and database from previous install. View files/Attempt to upload

Expected behaviour
File should upload as requested. Should be able to view files already uploaded.

Actual behaviour
Unable to attempt upload through website. Via mobile app get a permissions error.
When trying to view files on the server I get the error "This operation is forbidden" and nothing is displayed.
However if I go to the activity tab I am able to view files I have previously uploaded.

When I log in to Admin I get the error "Your web server is not yet set up properly to allow file synchronisation because the WebDAV interface seems to be broken."

I've set my logs to 0 and I am not getting any errors displayed in there.

Server configuration
Operating system: Centos 6.8 Minimal with Centos-web Panel
Web server: Dedicated.
Database: MySQL
PHP version: 5.4.45
ownCloud version (see ownCloud admin page): 9.1.0
Updated from an older ownCloud or fresh install: Fresh install with old database and uploads.
ownCloud log (data/owncloud.log, see https://central.owncloud.org/t/how-to-find-webserver-or-oc-logfile-enable-php-logfile/808): Nothing.

Special configuration (external storage, external authentication, reverse proxy, server-side-encryption): None.

Integrity status for oC9+

No errors have been found.

#2

Did you fix the permissions after copying? Can you access ownclouddata:
sudo -u apache ls -slia /path/to/ownclouddata


#3

Thanks for the reply.

owncloud data is set to 777 recursively.

Running that command returns this:

66846729  4 drwxrwxrwx 5 staples staples  4096 Aug 18 21:09 .   
66846721  4 drwx--x--x 7 staples staples  4096 Aug 18 21:08 ..      
66846733  4 drwxrwxrwx 2 staples staples  4096 Aug 16 16:27 files_external        
66846731  4 -rwxrwxrwx 1 staples staples   284 Aug 16 16:27 .htaccess       
66848067  4 -rwxrwxrwx 1 staples staples   145 Aug 18 19:17 htaccesstest.txt                                            
66846732  0 -rwxrwxrwx 1 staples staples     0 Aug 16 16:27 index.html                                                  
66846730  0 -rwxrwxrwx 1 staples staples     0 Aug 16 16:27 .ocdata                                                     
66848063 16 -rwxrwxrwx 1 staples staples 14832 Aug 19 15:37 owncloud.log                                                
67241430  4 drwxrwxrwx 7 staples staples  4096 Aug 16 16:32 <USER1>                                       
66846735  4 drwxrwxrwx 8 staples staples  4096 Aug 16 16:32 <USER2>

Thanks.


#4

chmod 777 should not be a permanent solution.

On CentOS, you have SELinux which can prevent such access, or in php the open_basedir-setting (if it is used, make sure the new path to owncloud is part of it as well).