Tribune

Home » Liferay Portal » English » 2. Using Liferay » General

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Ronald Un
cannot access webdav using Windows 7
19 novembre 2012 23.17
Risposta

Ronald Un

Punteggio: New Member

Messaggi: 4

Data di Iscrizione: 20 ottobre 2012

Messaggi recenti

Hello,

I set up a Liferay portal 6.1.1 CE GA2 and create some folders and upload some files to the Documents and Media. After that I tried to use the webdav URL (provided in "Access from Desktop" function) to access the folders in Windows 7, it prompts me username and password and I tried many times (using admin and other normal user account) but none of them work. I captured the debug log listed below:


17:39:54,662 DEBUG [http-bio-80-exec-10][WebDAVServlet:59] User agent Microsoft-WebDAV-MiniRedir/6.1.7601
17:39:54,667 DEBUG [http-bio-80-exec-10][BasePropMethodImpl:382] Response XML
<?xml version="1.0"?>

<D:multistatus xmlnsemoticon="DAV:">
<D:response>
<D:href>/api/secure/webdav/guest/document_library/h1</D:href>
<D:propstat>
<D:prop>
<D:displayname>h1</D:displayname>
<D:getlastmodified>Mon, 19 Nov 2012 12:17:25 CST</D:getlastmodified>
<D:getcontenttype>httpd/unix-directory</D:getcontenttype>
<D:resourcetype>
<D:collection/>
</D:resourcetype>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>
17:39:54,667 INFO [http-bio-80-exec-10][WebDAVServlet:151] PROPFIND /api/secure/webdav/guest/document_library/h1 207
17:39:54,901 DEBUG [http-bio-80-exec-5][WebDAVServlet:59] User agent Microsoft-WebDAV-MiniRedir/6.1.7601
17:39:54,904 DEBUG [http-bio-80-exec-5][BasePropMethodImpl:382] Response XML
<?xml version="1.0"?>

<D:multistatus xmlnsemoticon="DAV:">
<D:response>
<D:href>/api/secure/webdav/guest/document_library/h1</D:href>
<D:propstat>
<D:prop>
<D:displayname>h1</D:displayname>
<D:getlastmodified>Mon, 19 Nov 2012 12:17:25 CST</D:getlastmodified>
<D:getcontenttype>httpd/unix-directory</D:getcontenttype>
<D:resourcetype>
<D:collection/>
</D:resourcetype>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>
17:39:54,904 INFO [http-bio-80-exec-5][WebDAVServlet:151] PROPFIND /api/secure/webdav/guest/document_library/h1 207



portal-ext.properties:

webdav.servlet.hosts.allowed=
webdav.servlet.https.required=false


I also tried the guide in http://www.liferay.com/community/wiki/-/wiki/Main/Accessing+the+Document+Library+with+WebDAV but none of them work.
So what am I missing in here?

My platform:
CentOS 6.3 x64
Tomcat 7.0.32
Java 1.7.0_09
Mysql 5.1.66
Windows 7 x86 Chinese

Thanks a lot.

Best regards,
Ronald
Juan Gonzalez
RE: cannot access webdav using Windows 7
20 novembre 2012 0.08
Risposta

Juan Gonzalez

LIFERAY STAFF

Punteggio: Liferay Legend

Messaggi: 2008

Data di Iscrizione: 28 ottobre 2008

Messaggi recenti

What is the input you provide? If you have configured auth by email you should enter email.

Did you try changing it to screenname?
Ronald Un
RE: cannot access webdav using Windows 7
20 novembre 2012 0.20
Risposta

Ronald Un

Punteggio: New Member

Messaggi: 4

Data di Iscrizione: 20 ottobre 2012

Messaggi recenti

Hi Juan,

I have changed the portal setting to use screen name to login.
When I tried to login to webdav using my admin account, I have tried screen name, e-mail and user id but none of them work.

BTW, the log I posted didn't show any login error, that is strange.

Best regards,
Ronald
Juan Gonzalez
RE: cannot access webdav using Windows 7
20 novembre 2012 2.21
Risposta

Juan Gonzalez

LIFERAY STAFF

Punteggio: Liferay Legend

Messaggi: 2008

Data di Iscrizione: 28 ottobre 2008

Messaggi recenti

Did you change values in liferay-web.xml?
Ronald Un
RE: cannot access webdav using Windows 7
20 novembre 2012 17.01
Risposta

Ronald Un

Punteggio: New Member

Messaggi: 4

Data di Iscrizione: 20 ottobre 2012

Messaggi recenti

Juan Gonzalez P:
Did you change values in liferay-web.xml?


No. I modified portal-ext.properties and liferay-portlet.xml only.

BTW, I include the portal-ext.properties below for your reference.


###Default setup###
liferay.home=/opt/liferay
setup.wizard.enabled=false

###User setup###
users.delete=false
users.update.last.login=true
terms.of.use.required=false
users.reminder.queries.enabled=false
passwords.encryption.algorithm=SHA-256

###MYSQL settings###
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=XXXXXX
jdbc.default.password=XXXXXX
database.mysql.engine=InnoDB
database.mysql.function.lower.enabled=false

###custom tables using hibernate###
#hibernate.hbm2ddl.auto=update

###path settings###
auto.deploy.deploy.dir=${liferay.home}/deploy
lucene.dir=${liferay.home}/data/lucene
jcr.jackrabbit.repository.root=${liferay.home}/data/jackrabbit
image.hook.file.system.root.dir=${liferay.home}/data/images
dl.hook.file.system.root.dir=${liferay.home}/data/document_library

###user layout site###
layout.user.public.layouts.enabled=false
layout.user.public.layouts.auto.create=false
layout.user.private.layouts.enabled=true
layout.user.private.layouts.auto.create=true
#layout.friendly.url.keywords=

###portal settings###
#portal.ctx=\
#company.default.home.url=web/guest
#auth.forward.by.last.path=true


###session settings###
session.enable.url.with.session.id=true
session.timeout=15
session.timeout.warning=0
session.timeout.auto.extend=true
session.timeout.redirect.on.expire=false
session.enable.persistent.cookies=true


###CAPTCHA###
captcha.max.challenges=1
captcha.check.portal.create_account=true
captcha.check.portal.send_password=true
captcha.check.portlet.message_boards.edit_category=false
captcha.check.portlet.message_boards.edit_message=false
captcha.engine.simplecaptcha.height=60
captcha.engine.simplecaptcha.width=200
captcha.engine.simplecaptcha.background.producers=nl.captcha.backgrounds.FlatColorBackgroundProducer,nl.captcha.backgrounds.GradiatedBackgroundProducer,nl.captcha.backgrounds.SquigglesBackgroundProducer,nl.captcha.backgrounds.TransparentBackgroundProducer
captcha.engine.simplecaptcha.text.producers=com.liferay.portal.captcha.simplecaptcha.DictionaryWordTextProducer,com.liferay.portal.captcha.simplecaptcha.PinNumberTextProducer,nl.captcha.text.producer.DefaultTextProducer,nl.captcha.text.producer.FiveLetterFirstNameTextProducer

#
# Set the list of article types. The display text of each of the article
# types is set in content/Language.properties.
# ROOT/WEB-INF/classes/content/Language-ext.properties
# ROOT/WEB-INF/classes/content/Language-ext_en.properties
# ROOT/WEB-INF/classes/content/Language-ext_en-US.properties
#
journal.article.types=announcements,blogs,general,news,press-release,test

###WEBDAV###
webdav.servlet.hosts.allowed=
webdav.servlet.https.required=false

###File lock properties###
lock.expiration.time.com.liferay.portlet.documentlibrary.model.DLFolder=0
lock.expiration.time.com.liferay.portlet.documentlibrary.model.DLFileEntry=0




Best regards,
Ronald
Ronald Un
RE: cannot access webdav using Windows 7
20 novembre 2012 17.55
Risposta

Ronald Un

Punteggio: New Member

Messaggi: 4

Data di Iscrizione: 20 ottobre 2012

Messaggi recenti

Hi Juan,

Just now I reinstalled Liferay again to check whether it is the settings issue. The following is the steps I did.

I use the default settings and no other extra settings applied.

I created a folder in Documents and Media, connect to webdav in Windows 7, still got the same error as my first post.

I tried to use Windows Server 2008 R2 to connect webdav and it gave me an error message 0x80070043 (Network name cannot be found).

I tried to use Internet explorer to access webdav, it prompted me username and password and then Tomcat reports me a 404 error (The requested resource is not available).

Noted that all OS have latest patches applied.

Best regards,
Ronald
Just Me
RE: cannot access webdav using Windows 7
20 dicembre 2013 8.51
Risposta

Just Me

Punteggio: New Member

Messaggi: 1

Data di Iscrizione: 20 dicembre 2013

Messaggi recenti

I was struggling over a week with the same problem... But in my case I was trying to implement (for learning purposes) small WebDAV server in Java on Tomcat. Whatever I did, Windows all the time complained about something (and it turned out those messages had absolutely NOTHING in common with the real problem), but all other WebDAV clients worked just fine with my server. What the heck? Well, pursuing the thing, I found out that Box service (disk space hosted on a cloud) have also DAV support for the storage. I was very surprised, when I found out, that mapping this service (running on Sabredav) as a drive worked out of box with no problems whatsoever. I just typed URL in the dialog window (well, I also checked "use different credentials") and it just... worked! So if there is ONE service that actually works, it must be possible then to make it work with my server, right? ;-) As to this moment, false error messages form MiniRedir made me think it's configuration problem. So I spend literally days on trying different approaches, settings, a.s.o. All futile. Then I tried this: I used curl (from command line) to connect to Box WebDAV, get response for OPTIONS and PROPFIND and use exactly the same headers AND content (XML) in my server for these HTTP request. At this point my intention was to completely fake the response, but it would allowed me to at least use tested and working multistatus response. To my surprise mapping worked at once! And as I didn't change a thing in the configuration, it must been involved in the content actually. When I changed multistatus to XML generated from my server, again I wasn't able to map the drive. Switching back to faked reply --- and all started to work again. So I shortened the Box response to single minimal response element that still worked and interchangeably I was trying to send similar generated content. But even if the XML was pretty the same, fake one worked and generated didn't. Cursing and berating didn't help. One thing that actually differed was file name, file size and creation/update timestamps. Finally I found the culprit: getlastmodified. For some unknown reason, when I generated the date, it didn't work, but when I copy-pasted it from Box response, I was able to map the drive. What da?... So I went into WebDAV specification and RFC-1123 specifically which then pointed me to RFC-2616. What it turned out? That HTTP-date (used in getlastmodified element) must be represented in GMT (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3 --- see from "All HTTP date/time stamps (...)"). In my case date formatter was using CEST timezone... As I changed my code to use GMT oriented timestamps, I was finally able to map drives flawlessly.

In your post I see this:

1<D:displayname>h1</D:displayname>
2<D:getlastmodified>Mon, 19 Nov 2012 12:17:25 CST</D:getlastmodified>


As you can see, timezone is CST. If you change the time to 18:17:25 GMT, it should work. If you can't change it in the code, you would probably have to change system timzeone (or maybe some other settings). At least, from my experience, you won't be able to map anything, until you fix dates. And believe me --- all those "helpful" error messages I got, had nothing to do with real case.