Project

General

Profile

Webdav plugin

Added by Arnaud Martel about 14 years ago

Questions & problems related to webdav plugin


Replies (90)

RE: GOT IT !!! - Added by Xabier Elkano over 13 years ago

Arnaud Martel wrote:

Good news!!! Error is, in fact, caused by redmine_http_auth plugin...

I don't have any trouble on my server because I use my own version of this plugin (I removed everything except the authentication part...).
As a workaround, you can use my version (cf attached file). Let me know if it works for you too...

Arnaud, great job!

I was having same issue here after upgrading to redmine 1.2.1.
It works, thank you!.

RE: Webdav plugin - Added by Takashi SUGIMURA over 13 years ago

Arnaud,

Thank you very much for your great work!
I've also confirmed that this plugin works well.

I am sorry that I reply you lately.

Thanks again!!!

Sugi

RE: Webdav plugin - Added by Andy Wettstein almost 13 years ago

Hi,

I'm trying to get the webdav plugin set up and I don't seem to be able to make it work. I get this in the logs:


Processing WebdavController#rootwebdav (for xxx at 2012-02-20 14:58:07) [OPTIONS]
  Parameters: {"action"=>"rootwebdav", "controller"=>"webdav"}
Completed in 14ms (View: 1, DB: 2) | 200 OK [https://xxx/redmine/webdav/]

Processing WebdavController#rootwebdav (for xxx at 2012-02-20 14:58:07) [PROPFIND]
  Parameters: {"action"=>"rootwebdav", "controller"=>"webdav", "propfind"=>{"prop"=>{"getcontentlength"=>{"xmlns"=>"DAV:"}, "checked_in"=>{"xmlns"=>"DAV:"}, "getlastmodified"=>{"xmlns"=>"DAV:"}, "checked_out"=>{"xmlns"=>"DAV:"}, "executable"=>{"xmlns"=>"http://apache.org/dav/props/"}, "resourcetype"=>{"xmlns"=>"DAV:"}}, "xmlns"=>"DAV:"}}

NoMethodError (undefined method `created_on' for nil:NilClass):
  /srv/redmine/redmine/public/dispatch.fcgi:24

This is on redmine 1.3.1 and the latest redmine_webdav plugin. I'm running it on debian 6.
I've checked http auth in a web browser for /redmine/webdav and it is working ok.

Any ideas for this?

Thanks
Andy

RE: Webdav plugin - Added by Arnaud Martel almost 13 years ago

Hi Andy,

When I look into my code, I find that this error occurs when you are identified as a user who is not member of at least one project...

Could you check that:
  • You have correctly defined a role with the webdav permissions granted
  • You are member of a project where:
    • The webdav module is enabled
    • You have the role previously defined
    • At least one the following modules is enabled: files, documents, repository
    • You have configured the webdav settings for your project (to define what you want to publish over webdav)

Kind regards,
Arnaud

RE: Webdav plugin - Added by Andy Wettstein almost 13 years ago

AFAICT, I have set the appropriate permissions and project settings.

I gave the manager role the webdav manage and use privileges.
I have a sandbox project where I am the manager. Files, documents, and repository are all enabled on the project.
I enabled webdav in the sandbox project settings and files, documents, and repository should be exported.

Although it does seem like nothing is active for the webdav plugin. If I comment the lines in acts_as_webdav.rb for that set the creationdate, getlastmodified, getetag I don't get the errors, although, the collection is obviously empty.

RE: Webdav plugin - Added by Arnaud Martel almost 13 years ago

If I'm correct, you have verified that:
- http authentication is configured in apache
- if you try to open the /redmine/webdav url in a browser, then you have the login window
- after entering a correct login/password, the window disappears

But did you checked that redmine_http_auth plugin is working (if not, my plugin will identify you as anonymous and it may explain why you are not member of any project...). To do that, you can insert the following line in acts_as_webdav.rb at line 90 (it's not very clean but it's easy to do...)

RAILS_DEFAULT_LOGGER.info "Current user: #{User.current}" 

then restart your redmine server and look into the production.log if you're correctly identified...

RE: Webdav plugin - Added by Andy Wettstein almost 13 years ago

Ok.

I keep getting this post rejected as spam, so we'll see if this works.

It was a problem with authentication. I was showing up as anonymous.

With fcgid and aliasing, apparently redirect remote user (should be all caps with underscores) is set instead of the remote user environment variable.

Andy

Problems with Redmine 1.3.1 and plugin version 0.3.0 - Added by Pedro Gutierrez over 12 years ago

Hi Arnaud, we continue to use your plugin year after year without any problem. Thanks.

The other day however, we upgraded to redmin 1.3.1 together with the last version of your plugin (0.3.0)

And now, everytime we create a new project, the default webdav configuration for the new project has a couple of checks activated that don't let webdav work properly.

The error in windows xp reads something like "can't find the documents in this folder. Maybe it has been moved or removed, o a problem in the network might exist"

The error goes away when we uncheck the following options in the configuration of the plugin for the specific project.

RE: Webdav plugin - Added by Arnaud Martel over 12 years ago

Hi Pedro,

Sorry but I have defined the default values to fit my needs (I only publish the main repository over webdav). If you want to change them, you can edit redmine_webdav/app/models/webdav_settings.rb to modify lines 11 and 12:

      setting.subversion_enabled = false
      setting.subversion_only = false

Restart you web server and it should work as you wish...

In a future release, I will integrate a way to change default values using the plugin settings (from administration menu)

Kind regards,
Arnaud

RE: Webdav plugin - Added by Pedro Gutierrez over 12 years ago

Thanks Arnaud
we'll change that.

BR
Pedro

RE: Webdav plugin - Added by Alexander P over 12 years ago

If I check if I'm logged in with the right user like Arnaud Martel suggested I only get a log entry if I place the snipped before "resources = []" if I place it after it I dont get an entry for user at all.

When I try to connect via webdav client I get redirected to the normal login: (from production log)

Processing AccountController#login (for 217.19.38. at 2012-06-06 13:47:11) [OPTIONS]
  Parameters: {"action"=>"login", "controller"=>"account"}
Failed login for '' from 217.19.38. at Wed Jun 06 11:47:11 UTC 2012
Rendering template within layouts/base
Rendering account/login

RE: Webdav plugin - Added by Arnaud Martel over 12 years ago

It's look like you don't have installed redmine_http_auth plugin and/or RedmineAdvanced.pm. You may have also have something wrong with your apache configuration...

RE: Webdav plugin - Added by Alexander P over 12 years ago

If I'm browsing to /webdav/ I get the http auth dialogue and I can login with my redmine credentials. If I place the RAILS_DEFAULT_LOGGER.info "Current user: #{User.current}" snipped before resources = [] in acts_as_webdav.rb I see the correct user in the production log.

       def rootwebdav
          set_depth
          if request.method == :options
            webdav_options
          else
            begin
              RAILS_DEFAULT_LOGGER.info "Current user: #{User.current} (Line87)" 
              raise NotImplementedError unless (request.method == :propfind || request.method == :options)
              #resources = Project.find(:all, :conditions => Project.visible_condition(User.current))
              RAILS_DEFAULT_LOGGER.info "Line90" 
              resources = []

when I'm browsing to /webdav it leads to this production log (which is in line with my expectations:

Processing WebdavController#rootwebdav (for 217.19.38.x at 2012-06-08 10:02:11) [GET]
 Parameters: {"action"=>"rootwebdav", "controller"=>"webdav"}
Current user: Alexander Line87
Completed in 51ms (View: 0, DB: 33) | 501 Not Implemented [http://x/webdav]

If I'm using a webdav client:

Processing AccountController#login (for 217.19.38.x at 2012-06-08 10:04:00) [OPTIONS]
  Parameters: {"action"=>"login", "controller"=>"account"}
Failed login for '' from 217.19.38.x at Fri Jun 08 08:04:00 UTC 2012
Rendering template within layouts/base
Rendering account/login
Completed in 34ms (View: 15, DB: 3) | 200 OK [http://x/]

The one strange thing is that when connecting via webdav-client (windows 7 enterprise) is that there's no log entry for /webdav only for /

my apache vhost config:

<VirtualHost *:80>
PerlLoadModule Apache::Authn::RedmineAdvanced
  ServerName redmine.x.com
  DocumentRoot /srv/www/htdocs/redmine/public
  <Directory /srv/www/htdocs/redmine/public>
    AllowOverride all
    Options -MultiViews
  </Directory>

  RailsBaseURI /redmine

  <Directory /srv/www/htdocs/redmine>
    Options -MultiViews
  </Directory>

<Location /webdav>
AuthType Basic
AuthName REDMINE
Require valid-user

PerlAccessHandler Apache::Authn::RedmineAdvanced::access_handler
PerlAuthenHandler Apache::Authn::RedmineAdvanced::authen_handler
RedmineDSN "DBI:mysql:database=x;host=localhost;port=3306" 
RedmineDbUser "x" 
RedmineDbPass "x" 
RedmineAuthenticationOnly "On" 
Order allow,deny
Allow from 127.0.0.1
Satisfy Any
</Location>                                                                                     
</VirtualHost>

RE: Webdav plugin - Added by Felix Friedrich over 11 years ago

I get the same 501 like Alexander P.

Is anyone having the same error and/or resolved it?

RE: Webdav plugin - Added by Arnaud Martel over 11 years ago

I suppose that you are using a web browser and that's why you have a 501 error. The url /webdav is designed to be only accessed from a webdav client (with a PROPFIND method and not a GET...).

(76-90/90)