0

I have built an Owncloud 10 server on ubuntu 16.04 and I wish to run fail2ban, I believe that I have made an error when configuring access to Owncloud.

I ran sudo chown -R www-data:www-data /var/www/owncloud/, in this folder is a Data folder then a log file owncloud.log fail2ban does not appear to have access to this file and I believe that it is caused by me running the chown command. how can I resolve this issue, I can see the log file when I access the file through the Owncloud gui so it has to be a permissions issue.

  • 1
    You could see if it has read access by just looking at it with ls -l /var/www/owncloud/owncloud.log or if that looks fine the owncloud folder itself. – Ziazis Oct 18 '17 at 6:35
  • Please add the output of @Ziazis code to your question. – derHugo Oct 18 '17 at 12:43
0

Another solution would be to use Nextcloud instead. It is fully open source, more secure and has a fail2ban solution build in als bruteforce protection.

  • Thanks for the information re Nextcloud will look into this in more depth, manage to resolve the issue accessing the owncloud.log, you gave the solution for me on digitalocean using chmod 755 – user78903 Oct 21 '17 at 11:07
0

In order to run a script it has to be executable.

Check if it has the executable flag set by running

ls -la /var/www/owncloud/

If not then set the flag running

sudo chmod +x /var/www/owncloud/fail2ban

Also if another user than www-data shall be able to run it you could instead run

sudo chown www-data:<otherUser> /var/www/owncloud/fail2ban

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.