-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
AH01630: client denied by server configuration: /var/www/nextcloud/config #15688
Comments
The only acess I see is to
|
I see this also every 15 Minutes with this client, V2.5 on Ubuntu 18.04. |
Could you post your log output of the client. And your webserver config? |
As for the log, I can't do that right away, since I downgraded to 2.3.3, but the server config file in question is probably the one in the config directory itself:
Somebody on diaspora* found this one after I posted something there: I'll try to get a logfile later today. |
If you mean the file
I've confirmed in On the server side, this is my config:
No errors there and nothing special in the logs either, but this from Apache:
(So it's every 8 Minutes and not 15.) Since this is over IPv6 the client ip in question is exactly the ip of this ubuntu machine with the 2.5-client. |
Should have started the client with the debug parameters, but I finally figured it out. :) I noticed a TIMEOUT in the client logs every 8 Minutes and on reconnect I saw the denied-line in the Apache Logs. I had this vhost running with HTTP/2, so I downgraded to HTTP/1.1 to test this out. And the TIMEOUTs are gone in the client. So far so good. But every time I start the client there is one new entry in the Apache logs. This does not happen, when I pause the sync and let it continue later. I attach the client debug log from startup here: Server is running Ubuntu 18.04.1 with Apache 2.4.29-1ubuntu4.4. |
I see this also; I'm just using the |
I have just upgraded from NC13 -> 14 -> 15. As soon as I went to 14 I started to see the error and my fail2ban kicked in. |
This comment has been minimized.
This comment has been minimized.
I'm getting the same here. @Skomli Disabling HTTP/2 worked for you? Server version: 15.0.2 Client version:
Client log: Nextcloud client logoutputPlease be aware that the follow log snippet is redacted. The actual usernames, filenames and paths have been replaced by `[*PLACEHOLDERS*]`
Webserver cfg: Apache2 Config
Webserver Log:
|
Forgot to ping @rullzer for additional logs. |
Any news on that? |
To avoid locking from fail2ban you may add
into For me it worked. |
I came to the following findings:
|
I can confirm this behavior on my sever. The requests sent are (twice!): This happens for instance with clients with the User Agent "Mozilla/5.0 (Macintosh) mirall/2.5.2git (build 20190319) (Nextcloud)" and "Mozilla/5.0 (Windows) mirall/2.5.1final (build 20181204) (Nextcloud)". It does not feel like a rewrite rule is applied, is it? access.log lists 200 as status message. |
Rewrite, not redirect. |
This seem to be a configuration issue with apache. Those are the rewrite rules:
On every request to the nextcloud server, that is like this This behavior is (most likely) caused by the option
See https://httpd.apache.org/docs/current/rewrite/flags.html#flag_pt has anybody an idea how to exclude the directory |
Maybe @kesselb or @rakekniven have some idea. |
Any progress? I have the same problem with fail2ban. |
I was having this problem with NC 16. Don't know if this applies to earlier versions of NC. |
Thanks for info, "Satisfy any" does the job. |
@bekon16 Did you use "Require all" AND "Satisfy any" or just the last one? |
Probably last one, i dont remember exactly, but i have reverted this, because all data files was accessible without any authentication - not sure only it was related to my apache config or not - but be careful when you use it in yours configuration. Here is reported issue related to this: |
Thank you. This fits my expectation and close the gap. |
see this also;
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I spent some time today to understand what the PT flag is supposed to do. I still have no idea why it's there in the first place. If one of you has a test system: Change And let us know if you run into weird issues ;) Keep in mind the change is not update safe and the integrity check might complain. |
…extcloud config/ directory caused by nextcloud/server#15688 when nextcloud role is enabled
…extcloud config/ directory caused by nextcloud/server#15688 when nextcloud role is enabled
Hm, I was able to track down when this error message happened in my set-up. Apparently every time I did restart the Linux nexctloud client the following sequence of requests have been issued:
And at the same time I did receive an error log entry: Apache 2.4, Debian 9 sites http conf:
So lets look at the .htaccess in /var/www/nextcloud/config
I do interpret this as follows:
Apparently Apache seems to have some issues with mixing old and new directives (google: access_compat:error AH01797) So I tried:
The result was that the error still happened when restarting the Linux nextcloud client, but this time reported from a different module (which is to be expected - we expressly stated that we do NOT want anybody to access this data).
So I would assume that the request of "GET /ocs/v1.php/config?format=json" should either not happen, or we should somehow allow this. Any clues anybody? |
I thought it was SUPPOSED to happen like this, that the error generated proves that the security we want (no direct access to the |
This comment was marked as off-topic.
This comment was marked as off-topic.
@WarpinWolf What you say makes sense. I just don't think it is a problem with Nextcloud app, but maybe the desktop client. Reading the earlier comments here and on other related threads (here and here) it appeared some folks were recommending granting access at the webserver, effectively disabling I also encountered this issue yesterday, but simply modified fail2ban as described by others to avoid getting my IP banned. For me the issue was with fail2ban, not with Nextcloud. If fail2ban is disable, yes the errors are still raised in the log, but it does not impact functionality or performance of Nextcloud. I know not a great answer, but I need my production instance up and running, not disabled because of an aggressive fail2ban policy. I appreciate your additional investigation and look forward to hearing from someone with more experience and insights that can answer the questions you posed. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@WarpinWolf your assumption is wrong. I would really appreciate if you could stop commenting on this issue. Your comments are not helpful and misleading. If you are interested in the actual problem I suggest to read this issue carefully from the beginning. |
nextcloud/desktop#2619 is going to remove the request to That should fix the problem for most people but the crazy rewrite rule (that rewrites |
Note however that as @nickvergessen pointed out, said patch breaks support for the "copy internal link" feature in the client. So I guess the alternative I proposed earlier of having another way to get the host part is likely a better path. |
@er-vin Do you mind sharing what the alternative was? |
When the solution will be available on Windows desktop client? After adding f2b to my setup I am suffering the same thing as you all now :/ |
No news for a few months now, any plan to address this somehow? |
I have the same on 1 location, the other don't have this. It is not good, the sync stop because fail2ban block this ip everytime a specific computer is started. |
@wedeen Try with this build:
|
@wedeen I suggest not installing untrusted/unsigned builds (this is very bad practice). As long as this problem is present I whitelisted this particular path in
|
Based on @WarpinWolf analysis, disabling the module helped but I had to commenting the line "Satisfy Any" after the line "Require all granted" , then no more error logs. a2dismod access_compat Combining old and new directives is discouraged, so I think is safe to comment that "Satisfy Any" after disabling access_compat, I think "Require all granted" will do the same job, please correct me if I am wrong. After that change, no more error logs when tried: |
…desktop client issue](nextcloud/server#15688) - fixes #775
How to use GitHub
Report
This is the first time I'm doing this, please be gentle ;-)
The client is trying to access /var/www/nextcloud/config, which is explicitly denied all access via the .htaccess file in that particular directory.
I noticed this because I also have fail2ban running on the server, and my own IP address kept getting locked out of apache. I noticed the following line in my error.log:
AH01630: client denied by server configuration: /var/www/nextcloud/config
Client configuration
Client version: 2.5.0git
Operating system: Ubuntu 18.04 with GNOME
OS language: English
Qt version used by client package (Linux only, see also Settings dialog):
Client package (From Nextcloud or distro) (Linux only): Launchpad PPA
Installation path of client: /usr/bin/nextcloud
Server configuration
Operating system:
Web server: Apache
Database: MySQL 5.7.24
PHP version: 7.0.32
Nextcloud version: 14.03
Storage backend (external storage):
Logs
Please use Gist (https://gist.github.com/) or a similar code paster for longer
logs.
Template for output < 10 lines
Client logfile: Output of
nextcloud --logwindow
ornextcloud --logfile log.txt
(On Windows using
cmd.exe
, you might need to firstcd
into the Nextcloud directory)(See also https://docs.nextcloud.com/desktop/2.3/troubleshooting.html#log-files)
Web server error log:
Server logfile: nextcloud log (data/nextcloud.log):
The text was updated successfully, but these errors were encountered: