.Htaccess permission denied

I have exactly the same problem like spridarn.
The tipp from slapps didn’t help for me.

I found out, that the htaccess-file is successfully rewritten (php_value upload_max_filesize) when I change the maximum upload size in the admin-backend.
So I don’t believe that it is a problem with permissions.

All other occ-commands (maintenance, upgrade, …) work.

I’m using debian 8, maria-db and php7.
I’ve installed the same packages as is described in admin-manual.

Still same error:
Error updating .htaccess file, not enough permissions?

Yours is a different problem. Check the permissions on your .htaccess file as it’s likely either not owned by www-data or it’s set to r/o (644 or similar when running ls -la in your nextcloud directory)

Edit: I missed the first reply in the topic above

Ownership and permissions are correct:

Do I misconfigured one of them:

Alias /nextcloud "/var/www/nextcloud/"

<Directory /var/www/nextcloud/>
  Options +FollowSymlinks
  AllowOverride All

 <IfModule mod_dav.c>
  Dav off

 SetEnv HOME /var/www/nextcloud
 SetEnv HTTP_HOME /var/www/nextcloud


and /etc/apache2/sites-enabled/nextcloud-ssl.conf

<VirtualHost *:80>
 ServerName nextcloud.XXX.de
 Redirect permanent / https://nextcloud.XXX.de/
<VirtualHost *:443>
 ServerName nextcloud.XXX.de
 DocumentRoot /var/www/nextcloud
 SSLEngine on
 SSLCertificateFile /etc/ssl/localcerts/nextcloud_XXX_de.crt
 SSLCertificateKeyFile /etc/ssl/localcerts/nextcloud_XXX_de.key
 SSLCertificateChainFile /etc/ssl/localcerts/ca_bundle.crt
<IfModule mod_headers.c>
      Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains; preload"

Humour me and temporarily change the file permissions of the htaccess file to either 0755 or 0775 and retry. Your configuration files look fine but they’re not the problem - it’s telling you directly it can’t write to the htaccess file itself.

Sorry Jason,

also changing the permissions to 0755 or 0775 didn’t help - same error…
Thanks for your help!

Oh weird. I’ve seen that resolve it plenty of times.

@tflidd @LukasReschke any idea?