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

One file sync error: Service Temporarily Unavailable #1258

Closed
gnobal opened this issue Dec 6, 2013 · 5 comments
Closed

One file sync error: Service Temporarily Unavailable #1258

gnobal opened this issue Dec 6, 2013 · 5 comments

Comments

@gnobal
Copy link

gnobal commented Dec 6, 2013

I'm trying to sync a backup of a my Wordpress blog to ownCloud. One of the files (that comes with every installation of Wordpress, I believe) is"

Website/wp-includes/Text/Diff/Engine/shell.php

The file seems innocent enough, but for some reason I keep getting an error just for it. The error in the desktop client is:

File Website/wp-includes/Text/Diff/Engine/shell.php: Service Temporarily Unavailable

Client:
OS: Ubuntu 13.10 (fully updated)
Desktop client version: 1.4.2

Server:
Web server: Apache (host is Dreamhost. Can't find the version number)
PHP version:
ownCloud: 5.0.13 (up to date)
I believe I updated it once, but I don't remember from which version. It's a relatively recent install. Definitely started with version 5
config.php:

<?php
$CONFIG = array (
  'instanceid' => '5298a1e6389fa',
  'datadirectory' => '/home/user/oc/data',
  'dbtype' => 'sqlite3',
  'version' => '5.0.25',
  'installed' => true,
  'forcessl' => true,
);

No apps installed

Log:

12-06 17:17:40:151 Sync state changed for folder  "ownCloud/" :  "Sync Running" 
12-06 17:17:31:007 _csync_push_file: continuation: 0 206704325
12-06 17:17:31:007 _csync_push_file: Remote repository atomar push enabled for ownclouds://gnobal.net/ownCloud/remote.php/webdav/Website/gnobal.net/wp-includes/Text/Diff/Engine/shell.php (0).
12-06 17:17:31:007 oc_module: => open called for ownclouds://gnobal.net/ownCloud/remote.php/webdav/Website/gnobal.net/wp-includes/Text/Diff/Engine/shell.php
12-06 17:17:31:007 oc_module: Stating directory ownclouds://gnobal.net/ownCloud/remote.php/webdav/Website/gnobal.net/wp-includes/Text/Diff/Engine
12-06 17:17:31:007 oc_module: owncloud_stat ownclouds://gnobal.net/ownCloud/remote.php/webdav/Website/gnobal.net/wp-includes/Text/Diff/Engine called
12-06 17:17:31:008 oc_module: => Errno after fetch resource list for ownclouds://gnobal.net/ownCloud/remote.php/webdav/Website/gnobal.net/wp-includes/Text/Diff/Engine: 0
12-06 17:17:31:008 oc_module: Working on file Engine
12-06 17:17:31:008 oc_module: STAT result from propfind: Engine, mtime: 1385895330
12-06 17:17:31:008 oc_module: Directory of file to open exists.
12-06 17:17:31:008 oc_module: PUT request on /ownCloud/remote.php/webdav/Website/gnobal.net/wp-includes/Text/Diff/Engine/shell.php!
12-06 17:17:31:008 oc_module: Sendfile handling request type PUT. fd 30
12-06 17:17:31:008 hbf_splitlist: hbf_splitlist: block_size: 10485760 threshold: 10485760 st_size: 5262

12-06 17:17:31:008 hbf_splitlist: hbf_splitlist: num_blocks: 1 rmainder: 5262 blk_size: 10485760

12-06 17:17:31:008 hbf_splitlist: hbf_splitlist: created block 0   (start: 0  size: 5262)
12-06 17:17:31:008 oc_module: about to send 1 block
12-06 17:17:31:008 oc_module: Existing chunk info 0 206704325 
12-06 17:17:31:008 _hbf_dav_request: HBF: Block: 0 , Start: 0 and Size: 5262
12-06 17:17:31:008 oc_module: Chunk upload completed for 'ownclouds://gnobal.net/ownCloud/remote.php/webdav/Website/gnobal.net/wp-includes/Text/Diff/Engine/shell.php' (5262 bytes out of 5262)
12-06 17:17:31:458 oc_module: Chunk upload completed for 'ownclouds://gnobal.net/ownCloud/remote.php/webdav/Website/gnobal.net/wp-includes/Text/Diff/Engine/shell.php' (5585 bytes out of 5262)
12-06 17:17:31:458 _csync_push_file: file: /media/green/ownCloud//Website/gnobal.net/wp-includes/Text/Diff/Engine/shell.php, command: sendfile, error: Unknown error 10014 from errno 10014
12-06 17:17:31:458 _csync_push_file: remember chunk: 0  (transfer id 206704325 )
12-06 17:17:31:458 _csync_report_parent_error: Mark parent directoy `Website/gnobal.net/wp-includes/Text/Diff/Engine` as an error
12-06 17:17:31:458 _csync_report_parent_error: Mark parent directoy `Website/gnobal.net/wp-includes/Text/Diff` as an error
12-06 17:17:31:458 _csync_report_parent_error: Mark parent directoy `Website/gnobal.net/wp-includes/Text` as an error
12-06 17:17:31:458 _csync_report_parent_error: Mark parent directoy `Website/gnobal.net/wp-includes` as an error
12-06 17:17:31:458 _csync_report_parent_error: Mark parent directoy `Website/gnobal.net` as an error
12-06 17:17:31:458 _csync_report_parent_error: Mark parent directoy `Website` as an error

And later own in the log:

12-06 17:17:42:784   ** error Strings:  ("File Website/gnobal.net/wp-includes/Text/Diff/Engine/shell.php: Service Temporarily Unavailable") 
12-06 17:17:42:784     * owncloud csync thread finished with error 

Hopefully I posted all the relevant details. If I have to guess I would say that the errno 10014 is the suspect here, but I really have no clue. Also, this only happens for one file out of about 4000 files.

@dragotin
Copy link
Contributor

dragotin commented Dec 6, 2013

@gnobal Can you see what the server replies on that request? You can see that in the server access_log.

@DeepDiver1975 is it possible that the file name is rejected by the server?

@gnobal
Copy link
Author

gnobal commented Dec 6, 2013

In access.log I see:

85.65.139.170 - - [06/Dec/2013:07:38:35 -0800] "PUT /ownCloud/remote.php/webdav/Website/gnobal.net/wp-includes/Text/Diff/Engine/shell.php HTTP/1.1" 503 715 "-" "Mozilla/5.0 (Linux) csyncoC/0.90.4 neon/0.29.6"

In error.log I see:

[Fri Dec 06 07:37:52 2013] [error] [client 85.65.139.170] ModSecurity: Access denied with code 503 (phase 2). Pattern match "(?:\\.php\\?act=(chmod&f|cmd|ls|f&f)|cx529\\.php|\\.php\\?(?:phpinfo|mtnf|p0k3r)|/shell[0-9]?\\.php|/\\.get\\.php)" at REQUEST_URI. [file "/dh/apache2/template/etc/mod_sec2/gotroot/50_asl_rootkits.conf"] [line "57"] [id "390146"] [rev "17"] [msg "Atomicorp.com - FREE UNSUPPORTED DELAYED FEED - WAF Rules: Command shell attack: PHP exploit shell attempting to run command"] [data "/shell.php"] [severity "CRITICAL"] [hostname "gnobal.net"] [uri "/ownCloud/remote.php/webdav/Website/gnobal.net/wp-includes/Text/Diff/Engine/shell.php"] [unique_id "UqHvUEWjgG8AACgUmZsAAAAN"]

And it looks like this is the culprit.... some security module on the server recognizes this as if it were some kind of attempt of an attack.

Is it something that can be solved in ownCloud? I'm sure other users would run into this. If not, I will contact Dreamhost.

@dragotin
Copy link
Contributor

dragotin commented Dec 6, 2013

yes, that's what I expected. Modsecurity does not permit that. Nothing to be fixed within ownCloud. Closing, sorry...

@dragotin dragotin closed this as completed Dec 6, 2013
@gnobal
Copy link
Author

gnobal commented Dec 6, 2013

Hopefully I'll be able to set a rule in .htaccess to disable ModSecurity for ownCloud.

Thanks for the quick response!

@Pro
Copy link
Contributor

Pro commented Dec 15, 2013

Ran into another problem if mod_security is enabled: owncloud/core#6396
There's also a snippet how to disalbe mod_security.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants