Fix problem htaccess on IIS

Ask all your questions regarding OC 5.x Please read the Support Forum Rules
Forum rules
Before you post; make sure you are using at least PHP Version 5.3.x - Also read How To Solve Problems By Yourself

Fix problem htaccess on IIS

Postby Jose.Jasso » Thu Apr 25, 2013 11:37 am

Hello!

I followed the instructions to install OwnCloud in a server. However, I have this problem and I haven't found how to fix it. I will appreciate anyone who can help me:

************************************************************************************
Problem:

Security Warning
Your data directory and your files are probably accessible from the internet. The .htaccess file that ownCloud provides is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root.

************************************************************************************

My instalation

OS: Windows Server 2008
Server: IIS 7
PHP version: 5.3.24 (windows installer)
MySQL: 5.6.10.1 (windows installer)
OwnCloud: 5.0.4

I'm not an expert on this, so I will appreciate you write it as easy as possible.
Thanks.
Jose.Jasso
Newbie
 
Posts: 5
Joined: Thu Apr 25, 2013 11:26 am
ownCloud version: 5.0.5
Webserver: IIS
Database: MySQL
OS: Windows Server
PHP version: 5.3.24

Re: Fix problem htaccess on IIS

Postby bugs.bunny » Thu Apr 25, 2013 2:11 pm

As far as I read, this is a warning about the storage location of your data directory. It should be solved by moving the data directory outside of the "wwwroot" directory. I don't know how change the data directory once it has been set, but I know that you can change the default location when first logging into owncloud website. This is the time when you should specify / create the owncloud admin account. There is a Button below the "user / pw" field (called sth like "advanced settings" or so), where you specify the local path to the data directory.

I read this in the tutorial "25 Essential Windows Home Server Projects Volume 2".

When I set the somewhere else (not the default wwwroot dir) I did not get any complaints anymore. Hope this helps.

btw: I am using windows home server v1 (based on server 2003 with iis 6)
bugs.bunny
Beginner
 
Posts: 18
Joined: Thu Apr 25, 2013 2:01 pm
ownCloud version: 5.0.5
Webserver: IIS
Database: MySQL
OS: Windows Server
PHP version: 5.4.13

Re: Fix problem htaccess on IIS

Postby Jose.Jasso » Fri Apr 26, 2013 2:05 pm

Thank you very much.
I was trying to find a way to protect the files with the data folder in the wwwroot/owncloud, but the easiest way to get rid of the security issue is moving the data folder.

viewtopic.php?f=17&t=7118&p=27761&hilit=windows+iis#p27761

In summary:

1. Stop IIS server.
2. Move your files to the path desired.
3. Find your config.php (c:\inetpub\wwwroot\owncloud\config).
4. Where it says "datadirectory", place the path of your new directory using \\ between folders instead of \.
For example, i moved them to (don't forget the ,):
'datadirectory' => 'C:\\ownCloud\\data',
5. Restart IIS.


You may need to enter in the new data directory and grant some privileges extras (Right click on the folder>Properties>Security) for each file or folder, but at least like these you fix the problem. :D
Jose.Jasso
Newbie
 
Posts: 5
Joined: Thu Apr 25, 2013 11:26 am
ownCloud version: 5.0.5
Webserver: IIS
Database: MySQL
OS: Windows Server
PHP version: 5.3.24

Re: Fix problem htaccess on IIS

Postby bugs.bunny » Mon Apr 29, 2013 9:32 am

OK, good job! Enjoy :D
bugs.bunny
Beginner
 
Posts: 18
Joined: Thu Apr 25, 2013 2:01 pm
ownCloud version: 5.0.5
Webserver: IIS
Database: MySQL
OS: Windows Server
PHP version: 5.4.13

Re: Fix problem htaccess on IIS

Postby bugs.bunny » Mon Apr 29, 2013 9:39 am

btw, did you encounter any other problems with OC? I am getting numerous errors and warnings after running 5.0.4 and 5.0.5 on my WHS (with IIS 6). They mainly point to a broken WebDAV funktion. The solution should be that I disable any Windows build-in WebDAV functions. Did you have to do so?

btw disabling it did not work for me either. I tried OC 4.5.10 without those Error-Log... I just would like to know if I am the only windows guy who had those problems with OC5.

thanks in advance
regards
bugs.bunny
Beginner
 
Posts: 18
Joined: Thu Apr 25, 2013 2:01 pm
ownCloud version: 5.0.5
Webserver: IIS
Database: MySQL
OS: Windows Server
PHP version: 5.4.13

Re: Fix problem htaccess on IIS

Postby SPeedY » Fri May 10, 2013 11:05 pm

Not sure if you found your answer, but here it is how I did it without moving the data directory off the root.

You can either do it via web by clicking on your owncloud site --> Request Filtering --> Hidden Segments and on the top right side click on Add Hidden Segment and add your data folder name or any other folder you would like to restrict view "data"

Or faster via the appcmd by copying and pasting the code below:
appcmd.exe set config "Default Web Site" -section:system.webServer/security/requestFiltering /+"hiddenSegments.[segment='data']"
PHP 5.4.10
MySQL 5.5.29
Desktop Client 1.2.0 (Windows and Mac)
Mobile Client Android
O.C 4.5.6 on Windows Server 2008 R2 IIS7
O.C 4.5.6 on Ubuntu 12.04 amd64 Server with sqlite & PHP 5.3.10
SPeedY
Beginner
 
Posts: 28
Joined: Tue Aug 07, 2012 3:51 pm


Return to ownCloud Community Edition 5.x

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 16 guests