-
Notifications
You must be signed in to change notification settings - Fork 30
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
cannot change to "delete" instead of "log only" #107
Comments
Hi, infos: |
Hello Lqp1 and crysman, maybe it's helpfull to check appconfit table via mysql @crysman select * from oc_appconfig where appid like '%anti%' \G If the scanner is working - maybe you can change it in the database as a workaround ... By the way i'm using 8.2.3 and 0.8.0.1 too - did you check your Log in the adminpanel ? |
Hi, I've "NULL" value for several other fields... So I changed all the fields manually (set to daemon, with right port, hosts, etc...) and now it shows up with the right parameters in Owncloud Administration Panel. Furthermore, it now works as expected when I upload files. So, this is a working workaround, thanks :) But I think there is an issue because it's impossible to change the parameters from owncloud directly :/ |
Hmm, I seee... this will be a problem (from the log): But, when I try to change to "Daemon" mode, it does not let me :/ - still errors like this in the log. How to solve it correctly? |
Hello crysman, how is your open_basedir set ? Maybe you finde something there ? |
Yep, I think you need to add /usr/bin/ to open_basedir if you want to use this mode for the plugin. If you want to use daemon mode, I think there is an issue in the plugin, and you can't change that from the menu... Just open mysql cli and update the fields manually. |
I've added /usr/bin to the php_admin_value[open_basedir] but I am still unable to make it work. Although there are no more error messages in the log, it does not let me change it to "Delete file" mode. What might be wrong? |
Here is my output:
There is nothing like "av_infected_action", and consequently no NULL values, as you say. |
Hi @crysman Regarding your database, I think there is more options as I have much more entries in MySQL:
Maybe the missing entries are created when needed (like for daemon mode or socket mode). You can try to update/create those fields manually ? It will allow you to change options, but you'll need to fix the open_basedir issue anyway :) |
Yes, I did check it via phpinfo() and indeed, it is there. Have a look in the config:
Clamscan is, indeed, in /usr/bin:
There are no errors regarding missing clamscan or PHP basedir in the log, so that is not an issue.
I've already:
No success :/ So the question remains: What is wrong with the plugin? How to make it work without direct DB changes? |
Doesn't my owncloud PHP website need also access to /var/run/clamav/ But I believe the plugin is broken somehow, because e.g. the "Add + rule" button doesn't do anything (see #108) EDIT 2016-05-11: I've added "/var/run/clamav" to the PHP's open_basedir in order to try the Daemon socket mode, but no luck. The UI doesn't let me change anything in the admin menu, even though there are no more AV-plugin-related errors in the log. |
I think you're right, and the plugin is broken... I hope someone else will be able to help us with this issue... The "Add + rule" button and plugin setup without direct DB access does not work neither in my setup... Maybe it's related to the fix in commit 8bea266 in PR #111 . If you really need to add more rules, you can give it a try ? owncloud PHP user must have access to /var/run/clamav only if you use AV plugin in socket mode. If using binary mode, you must only set open_basedir. |
I've just found out that the plugin kind of works. "Kind of" means:
So this is the issue now. Any optimistic future in the horizon? |
Adding required options directly to the DB and modifying some already existing values has solved partially the problem. Partially, because:
|
I'm glad to hear you finally make it work. I hope this issue will find a decent fix because this is really annoying. |
I never was able to reproduce it. Here is another take for a newly released 9.0.3:
ResultEverything is saved Rules in |
I just upgraded to OC 9.0.4, with files_antivirus v0.8.0.2 (I manually downloaded Tag 9.04). |
@Lqp1 is it still reproducible with more recent versions? |
@VicDeo I downloaded tag version v9.0.7RC1 (it shows v0.8.1.0 in OC) for my 9.0.4 owncloud and uncompressed the new archive in the "apps" folder. I reproduced the same issue as in my previous post. So if I want to change some parameters, I need to connect to my database directly. Maybe should I try a 9.1.X owncloud version ? |
We've just upgraded to OC 9.1.2 (stable), issue still persists. |
Issue still persists with oC 9.1.4, files_antivirus 0.9.0.0, PHP 5.6.30. |
Any chance to get this fixed? |
@crysman |
no message at all, page is reloaded, modified settings are gone (page is reloaded with the same settings as before changing them) there is only the error message with the code integrity warning, but that message is there all the time anyway (we need lib/imap.php modified) |
@crysman this line should prevent page from reload https://github.com/owncloud/files_antivirus/blob/stable9.1/js/settings.js#L146 So either the javascript part is not loaded properly or admin page layout is broken. |
@VicDeo well, this seems to be a good trail - there seems to be a problem with ACL, have look at this report from Chromium developer console when page
What shall I do? Where do I find proper ACL settings and why is it wrong in the first place? Thanks |
it seems to be quite inconsistent :/ look:
|
This has fixed the problem: After making this change, apache2 no longer replied with "403 Forbidden" to some of the .js and .css files under files_antivirus. I suppose it occurred a loong time ago, when files_antivirus had not been an official included app yet, and that it prevailed unfixed till these days. Thanks @VicDeo for leading me to the javascript debug trail. There is still one unanswered question here: |
Hi, there are some "Post Installation Steps" with a Permission Script. Feel free to modify it for you Installation: https://doc.owncloud.org/server/10.0/admin_manual/installation/installation_wizard.html#post-installation-steps-label Regards row2hot |
@crysman Files and directories should be at least readable by the user that is used to run webserver. The link provided by @row2hot comes from an ideal world of unix where the principle of least privilege rules and this is a basic hardening of ownCloud instance. |
OK, thank you both. I had to modify the referred script in order to have our owncloud web functioning (it has stopped working after running the set-strict-permissions script - it ended with whether NOT FOUND or 500 errors) Namely, I had to set the owner of all files and directories to the webserver user, as @VicDeo says. However, I've left the permissions to be set strict (0640 + 0750) in the script. My modified script version:
Is this safe enough? |
No, I don't believe its safe enough, since it has user-RW everywhere and the user is now the webserver user. What shall I do to both make it work and have it secure? Is this default installation setup, though? I do not remember... |
0640 and 0750 is working since years now in prod deployments. |
I am unable to change to "delete the file" instead of "log only" in the plugin options. Why? Any hints?
owncloud: ownCloud 8.2.3 (stable)
app: Antivirus App for files 0.8.0.1
php 5.5.30
The text was updated successfully, but these errors were encountered: