-
Notifications
You must be signed in to change notification settings - Fork 817
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
Remove .htaccess from ignored file list #85
Comments
That could override nextclouds server configuration and possibly break the file folder. Very bad idea. You could rename this file to DOT.htaccess and rename it when uploading the files to the productive webserver if its not too much PITA... But if there are more than one htaccess file this can be annoying, i understand. |
OwnCloud made that step. Check owncloud/client#6144 Maybe it would be nice to allow an administrator to activate/deactivate the |
I use Nextcloud extensively to synchronize web projects across machines (usually containing .htaccess files), so this is a pretty significant annoyance especially when you pair it with git and git constantly thinks I deleted the .htaccess file every time I'm not using the machine I originally created the project on... A simple solution would be to simply prepend a string to the ignored file prior to upload, removing the string again on download...? Maybe even hiding the string from the web interface making it completely seamless for the end user. |
Hello, for all people they need to allow the .htaccess file. Follow this steps:
Be careful your data folder should not hosted on your web server. Move it to e.x /home Have fun. |
So is there a real solution for this yet which will survive an update? I develop websites and .htaccess is a part of that. I want to use Nextcloud to store and sync my dev work but I can't feel comfortable with unexpected file deleting going on and I don't want to be constantly on alert for missing data. I do have my data folder outside web path so it could be just a tickbox in the admin somewhere "Do not block .htaccess" and the nextcloud server could check of the /data/ path is relative to site root and Disable the option with warning "Security warning: Do not allow .htaccess files if the /data/ folder is in your web path". |
I think administrators should have the power to edit the file ignore list via the web interface, given they know what they are doing. Which could include:
|
+1 Nextcloud could also rename the file for security reasons (e.g. .htaccess-SAFE) but display and download it as .htaccess in clients and the web interface. Manually renaming a file before uploading it is a massive pain if you're a web dev with lots of sites to sync, plus Windows won't easily allow renaming the files back to .htaccess (as the files lack a proper filename). |
I was going to jump on the bandwagon as I have a bunch of old projects that have .htaccess files as well, but realized that these project files shouldn't be left loose like this anyway and should be stuck in a version control system where their changes can be tracked. Since I host my own NextCloud instance, I'm going to either move my old projects to a self-hosted GitLab CE server or perhaps utilize BitBucket or GitLab private repositories and move my old projects there. In all honesty, this is the best solution. |
So that means we can't do web dev work or copy web dev data through nextcloud? |
I used to use dropbox for webdev before I clued into git. Git makes it so much better to track versions of files, role back, experiment with new code and all other stuff without having to keep separate copies of everything. Yes, you can use Nextcloud for webdev work, but it's really not the right tool. Nextcloud is used for my docs, and pictures, and that sort of sundry... Git is used for all webdev source code. (BitBucket and GitLab offer free private repositories). Rich |
While Git or SVN is a better tool for backing up web work, yes, I believe we're missing the point here. There are always arguments to be made for both sides (e.g. wanting to share a private link to a web project without the users having to register anywhere) and reasons behind why someone uses a specific tool and not another one. The point is: we want and expect Nextcloud to sync files, and in this case, it doesn't - for no good reason. I say "no good reason" because owncloud has a solution to this and there's multiple ways to solve it. And while we as developers understand why Nextcloud ignores .htaccess files in the first place, novice users might not - and that's a problem. Especially, if you remove .htaccess from the ignored file list. |
This issue seems to relate to the following server issue: nextcloud/server#13831 |
I don't know in old versions, but working ok with: |
Please see my suggestion for a better solution here: |
It's actually the same change mentioned in the referenced owncloud/client#5701 If you can't upload Closing this out. |
One can simply empty the default blacklist array in 'blacklisted_files' => array(), Thanks to https://help.nextcloud.com/t/solved-upload-htaccess-on-php-fpm/51913/2 EDIT: This requires extra configuration for Apache, other webservers ignore the file. |
The problem lies in how the webserver interacts with and handles the special file Your suggestion should absolutely not be attempted on a production system, unless the webserver settings are changed so that it doesn't treat |
Absolutely correct, IF you use Apache, which I do not. Forgot to put that disclaimer there though, thanks for the catch. |
Isn't it only a problem when the data directory is within the web root? So only needs to be blocked in that situation? |
.htaccess should be synced when enabling Synchronize hidden files.
Reference : owncloud/client#5701
The text was updated successfully, but these errors were encountered: