i have just installed NextCloud, and was quite happy, butā¦
i took all the files that I have in my ICloud synced folder and added them to my NextCloud folder and some files cannot be synced like a .htaccess file - sure I know what type of file this is, but what does that have to do with a synced folder ?
The .htaccess file is hidden on Linux web servers and should not be touched, because it is needed for security of the Nextcloud server f.ex. to grant access to authorized users only). It should be excluded from any synchronisation.
Then the folder āsomefolderā was copied from a website or from the Nextcloud user folder. Because it will not be displayed in Nextcloud, you will find it on the nextcloud server in the Nextcloud data folder or/and its subfolders.
btw.: Please look at the Nextcloud desktop client. In the settings you will find a list of files to be ignored, .htaccess is one of them.
P.S.: Syncing ONE folder to TWO cloud softwares will lead you into trouble beacause of unexpected events, in many cases with data-loss.
The problem is, if you upload to Nextcloud, Nextcloud runs on a webserver that might interprete this .htaccess which is potentially a problem, e.g. this is the webdav path for this file:
Iām not trying to sync the same folder to two different services.
I installed the NextCould desktop client, I then went to my ICloud folder, selected all, copy and then paste into my NextCloud folder, and then - after some time - I saw the error
the .htaccess is not on the āIgnored lsitā in the settings of my desktop client
I understand what a .htaccess file is, that is not the issue.
For me, my NextCloud is a place to store files, any file I choose just as I can on Google Drive, ICloud, DropBox or OneDrive - In fact Iām trying to get out of Google Drive, ICloud and OneDrive.
if there is files I choose to add to the Ignore list then its fine that it getās ignored and most of the files that is on the Ignored list make sense.
If a file is not on the ignored list I should be able to save it - IHMO.
I do also understand that NextClould uses Apache in the AIO default installation so I absolutely understand that a .htaccess file in the wrong place could make a mess, but⦠Iām just uploading files to a folder that is managed by NextCloud so that should not be a problem - IMO
Whatās next, can I not store .sh, .bat .cgi .php files ?
Did you check on the server, whether a .htaccess files exists in the target folder of the Nextcloud server? - Maybe the desktop client gives an error, because it can not be overwritten (as designed).
I recommend to add .htaccess to ignored files list
If you donāt use apache and/or the data folder is outside the webserver folder (so you can only access via php), you can modify the code and disable this check. I donāt know if there are other implications.
If that works, and you donāt want to modify it on your own, you can ask to change this and propose a pull request. And to break nothing with old/existing setups, keep the current behavior default, and put enough warnings that nobody does not turn this feature on by accident.
here the value for 'forbidden_filenames' is only pre-set/pre-filled with '.htaccess'. That default can be overridden by setting an empty array:
'forbidden_filenames' => array (),
BUT ā (donāt stop reading here)
.. because the legacy key 'blacklisted_files' is still read (until Nextcloud 34) and the two lists are merged (into each other), you must also clear the legacy key. Therefore add both entries to config/config.php (tested solution):