Unable to upload ".htaccess" file to nextcloud

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 20
Operating system and version (eg, Ubuntu 20.04): centOS 7.9
Apache or nginx version (eg, Apache 2.4.25): 2.46
PHP version (eg, 7.4): 7.4

The issue you are facing:Unable to upload “.htaccess” file to nextcloud

Is this the first time you’ve seen this error? (Y/N):Y

Steps to replicate it:

  1. Upload “.htaccess” to nextcloud

The output of your Nextcloud log in Admin > Logging:


The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):


The output of your Apache/nginx/system log in /var/log/____:


I want to upload “.file” and “hidden file” to nextcloud.

I can upload dot-files using desktop sync and web upload (NC 20). The exception is .htaccess
Perhaps some setting if you cannot upload hidden files.

1 Like

Thank you for your reply.
Can I upload “.htaccess” by any means?

Upload “.htaccess” is a security risk or breaks your nextcloud.
.htaccess - Wikipedia

Why do you want to upload this file in a data folder?

1 Like

I want to upload a backup of my website data.

Do not backup .htaccess. Copy .htaccess on your website to htaccess.txt and backup htaccess.txt . I think nextcloud is not a really good backup system. Nextcloud is a file sharing plattform and does not like all file names and/or file suffixes.

For webbased administration (with .htaccess support) look e.g. Tiny File Manager (you can deactivate external Google APIs), phpfm or elFinder
The tools can also ZIP your website including .htaccess-files.

If you copy your data to your local pc use tools like FileZilla.
Then you can ZIP all files and re-upload e.g. to you nextcloud.

1 Like

Thank you for letting me know the details.
I will try it with what you taught me.
That was a really big help.

1 Like