ownCloud 9 Code Signing and .htaccess - .htaccess

I have a modified .htaccess where I added a RewriteCond.
Now I get on every page load:
There were problems with the code integrity check. More information…
What is the right solution to prevent this error message? And of course, I don't want to use the original .htaccess.

This is easy to fix without having to keep integrity check disabled:
1.) Open up the admin area where you can click Rescan, keep that window open (don't click rescan yet)
2.) Edit your config/config.php file, and add this line to it
'integrity.check.disabled' => true,
3.) Click on Rescan in browser window from step 1 (wait for it to complete)
4.) Change the line added to config/config.php from true to false (or remove the line)
Voila! Profit!
Looks like when you disable integrity check and click the rescan, it will re-generate the signature.json file, and after doing that, you can then re-enable integrity check
:)

I might have found a solution in the documentation, although core developpers say this shouldn't be done:
https://doc.owncloud.org/server/9.0/admin_manual/issues/code_signing.html#errors
You could modify $OWNCLOUDHOME/core/signature.json file in order to update your .htaccess signature.
This should make owncloud think it has the right .htaccess file.
In order to do that:
1) run ./occ integrity:check-core
This will give you the expected signature and the actual signature for your core files.
2) edit core/signature.json and replace, on the .htaccess entry, the provided signature with your htaccess signature (given in step 1).
If, later, you need to file a bug report, owncloud developpers might ask you to restore the original .htaccess file and the original signature.json file, so make a backup. This feature is intended to mildly improve security and facilitate the developpers work.
Hope this will help you !
Edit Owncloud 9.1:
I've updated my own owncloud instance, and though I really do not recommand you to do that (use it at your own risks), you can disable code check in the config.php file.
Just add 'integrity.check.disabled' => true,

Related

Does the htaccess file change any other files on update?

I added 3 lines of code to the htaccess folder to remove the file extension on the directory, that broke many links, I reverted it back to the default file and the same errors are happening. I don't have the lines but I just need to know if there is anything else this folder changes after the changes take effect.
#MrWhite's comment was correct: It ended up being just cached data saved in Chrome. I just had to clear the cache on Chrome to solve the issue.

.htaccess doesn't work if comment row (# ...) exist

code below doesn't work my .htaccess file. I mean, after this code is applied, I can still index folders in html.
# BEGIN disable folder index
Options All -Indexes
# END disable folder index
however, code below works. I mean, after this code is applied, server gives 403 if I try to index a folder which I know that it exists.
Options All -Indexes
I'm on a shared hosting and have nothing to do with server config. .htaccess is created via notepad++ with encoding setting UTF-8 without BOM. .htaccess permission is set to 0644. there exist no other code in .htaccess.
what does this situation mean? what am I doing wrong?
Ok, looks like my original comment above pushed you into the right direction:
Most likely this is a problem with the line breaks. So that for the
interpreting part of the http server that "Options" line is not on a
separate line, thus also commented out. Check your line ending
characters by using a hexeditor. That s the only reliable tool to do
so.

Changes in .xsl file not reflecting on ccnet dashboard

I am trying to make some changes in my cruise control the web dashboard.
I modified the corresponding .xsl file, but the changes does not seem to reflect back on the dahsboard.
I have tried the following:
- Restart ccnet service.
- Restart IIS.
I am using ccnet version 1.6.7
Am I missing something here?
Download this tool
http://www.voidtools.com/download.php
Find all copies of your .xsl file.
Make a small (text only) change in the xsl file.......and find the one it is actually using.
My guess is that you have 2 of the same xsl, and you're updating the wrong one.
Also clear the cache of the browser, or do a force-refresh.
If that does not help, check that there is nothing wrong with the xsl.
Simple check : alter the xsl so that it adds some text that must always be visible in the output.

No php.ini file

I'm making a PHP form that requests a file for download. I've had an error with the script and did some searching found out that it was because my php.ini file needed allow_url_fopen = On, so I went to change the settings and my site has no php.ini file. I couldn't really find out how to make a php.ini file. How would I create this file? My web host says I need to create it. What are the default settings to put into this file?
First, try to figure out, whether you really don't have the file. The php.ini location can be found in phpinfo(); output.
Second, if there is such file, edit that one. If not, download the ZIP package from php.net and there is at least php.ini.recommended, which contains basic directives.
Well, if you have no php.ini file, you can create it with as few lines in it as you need. Just put allow_url_fopen = On on an ascii file and name it php.ini, copy it to the working directory or the public root. Take in mind that anyway this values can be overrided by hosting's staff in places where you do not have access. To see what is the final and actual setting that aplies use phpinfo().
A side note: .htaccess files can in some circunstances govern and override php settings, so also take a look on all of them (that are accesible to you) to see if you can set your preferences there. Be careful that systax differs from php.ini .htaccess example

.htaccess in Notepad ++

I am working with Notepad and the FTP plugin. The .htaccess files do not show up in the folder tree of the server. Anyone else encountered this and know of a fix?
I know this is an old question now, but I've run into this problem, too.
In the current version of Notepad++ (v5.9) the NppFTP plug-in (v0.23) has a setting for each connection called "LIST parameters". It is accessible via Settings/Profile settings/FTP Misc. Enter "-al" there and hidden files should be visible. Remember to set it for each profile.
The file is there, its just hidden. If you can type in a file name for download you can probably get it.
I don't use notepad plus but if the ftp plugin has a setting to show hidden files then you should be able to change that so you can see the .htaccess file. The server is probably unix so any file that starts with a dot is a hidden file.
It's normal behaviour. In options of your FTP client plugin find option "show hidden and hidden files. For example in Total Commander it's:
Network -> FTP Show hidden files
In the FTP page profile settings, choose FTP misc. and type -al. It fixed my problem

Resources