Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#10643 closed defect (worksforme)

[Errno 2] No such file or directory: '' when attempting to add a new account.

Reported by: adrya.stembridge@… Owned by: Steffen Hoffmann
Priority: low Component: AccountManagerPlugin
Severity: normal Keywords: needinfo file AccountModule
Cc: Trac Release: 0.12

Description

I recently installed AccountManager in my local copy of Trac. When attempting to add a new account, the following error appears:

[Errno 2] No such file or directory: '' when attempting to add a new account.

I double checked my trac.ini file to ensure there were no blank paths in the component or account-manager sections.

Here's my installation info:

Trac 	0.12
Babel 	0.9.5
Genshi 	0.6
mod_python 	3.2.8
pysqlite 	2.6.3
Python 	2.4.3 (#1, May 1 2012, 13:55:48) [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)]
setuptools 	0.6
SQLite 	3.3.6
Subversion 	1.6.11 (r934486)
jQuery	1.4.2
Enabled Plugins:
CKIntegration 	1.1dev 	/usr/lib/python2.4/site-packages/CKIntegration-1.1dev-py2.4.egg
TracAccountManager 	0.3.2 	/usr/lib/python2.4/site-packages/TracAccountManager-0.3.2-py2.4.egg
TracPermRedirect 	2.0 	/usr/lib/python2.4/site-packages/TracPermRedirect-2.0-py2.4.egg

And the error traceback:

File "/usr/lib/python2.4/site-packages/Trac-0.12-py2.4.egg/trac/web/main.py", line 513, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/lib/python2.4/site-packages/Trac-0.12-py2.4.egg/trac/web/main.py", line 235, in dispatch
  resp = chosen_handler.process_request(req)
File "/usr/lib/python2.4/site-packages/Trac-0.12-py2.4.egg/trac/admin/web_ui.py", line 116, in process_request
  path_info)
File "/usr/lib/python2.4/site-packages/TracAccountManager-0.3.2-py2.4.egg/acct_mgr/admin.py", line 137, in render_admin_panel
  return self._do_users(req)
File "/usr/lib/python2.4/site-packages/TracAccountManager-0.3.2-py2.4.egg/acct_mgr/admin.py", line 240, in _do_users
  _create_user(req, env, check_permissions=False)
File "/usr/lib/python2.4/site-packages/TracAccountManager-0.3.2-py2.4.egg/acct_mgr/web_ui.py", line 148, in _create_user
  acctmgr.set_password(username, password)
File "/usr/lib/python2.4/site-packages/TracAccountManager-0.3.2-py2.4.egg/acct_mgr/api.py", line 294, in set_password
  if store.set_password(user, password, old_password):
File "/usr/lib/python2.4/site-packages/TracAccountManager-0.3.2-py2.4.egg/acct_mgr/htfile.py", line 56, in set_password
  self.userline(user, password))
File "/usr/lib/python2.4/site-packages/TracAccountManager-0.3.2-py2.4.egg/acct_mgr/htfile.py", line 159, in _update_file
  f = open(filename, 'w')

Help appreciated.

Attachments (1)

ManageUserAccounts.png (22.0 KB) - added by Ryan J Ollos 12 years ago.

Download all attachments as: .zip

Change History (27)

comment:1 Changed 12 years ago by Ryan J Ollos

It looks like you need to setup a password store: AccountManagerPlugin/AuthStores.

comment:2 Changed 12 years ago by Steffen Hoffmann

Replying to adrya.stembridge@gmail.com:

I recently installed AccountManager in my local copy of Trac. When attempting to add a new account, the following error appears:

[Errno 2] No such file or directory: '' when attempting to add a new account.

I double checked my trac.ini file to ensure there were no blank paths in the component or account-manager sections.

Ok, this is a critical point indeed. Thanks for taking care about it.

Still I would prefer questions to our mailing-lists instead of tickets with suggested type 'defect', that too often turn out to be local installation/configuration issues. Because its about proofing the code is right and configuration or other local issues play wrong, that some/many developers still care. But but its not exactly nice play, to push-over the burden to the developers, you see?

Anyway, not that this ticket is already there, let's deal with it as efficient as possible.

Here's my installation info: ...

Ok, with Python2.4 Trac-0.12 is the best choice you could make, and current stable AcctMgr is about right as well.

And the error traceback: ...

Well, so I ask:

  • Did already check permissions? For obvious reasons the user/group that the Trac process is running as needs r/w permission on the directory and specified password file, if it already exists.
  • Are there more pre-existing accounts? If so, do you see these users in user admin's account list? This would narrow it down to just missing write access.
  • Are you able to change existing users passwords from the user admin page? This would be amazing and really wired, but good for double-checking, that no other code is involved apart from file handling.

You could do me one more favor in testing current trunk, because it is meant to be release-candidate for acct_mgr-0.4. But make sure to read upgrade notes to catch all required configuration changes for the next version, please. There are many, because both, password file stores and registration went thought a number of important changes, that changed component names (watch out for correct activation in [components]) as well as available options.

comment:3 in reply to:  1 Changed 12 years ago by Steffen Hoffmann

Keywords: file AccountModule added
Priority: highnormal

Replying to rjollos:

It looks like you need to setup a password store: AccountManagerPlugin/AuthStores.

Not necessarily, because a missing file should be added gracefully, if allowed by directory permissions.

comment:4 in reply to:  2 ; Changed 12 years ago by anonymous

Replying to hasienda:

Well, so I ask:

  • Did already check permissions? For obvious reasons the user/group that the Trac process is running as needs r/w permission on the directory and specified password file, if it already exists.

Permissions for the htpasswd file and directory containing the file are currently set writable by the server.

drwxrwxr-x 2 apache apache 4.0K Nov 20 13:59 conf

and..

-rw-rw-r-- 1 apache apache 209 Oct 17 11:15 trac.htpasswd

  • Are there more pre-existing accounts? If so, do you see these users in user admin's account list? This would narrow it down to just missing write access.

Yes, there are several existing accounts, but none appear in the list of users.

  • Are you able to change existing users passwords from the user admin page? This would be amazing and really wired, but good for double-checking, that no other code is involved apart from file handling.

See above.

comment:5 in reply to:  4 Changed 12 years ago by Steffen Hoffmann

Replying to anonymous:

Replying to hasienda:

Well, so I ask:
...

  • Are there more pre-existing accounts? If so, do you see these users in user admin's account list? This would narrow it down to just missing write access.

Yes, there are several existing accounts, but none appear in the list of users.

So you're configuration is not correct yet. You'll get a list immediately after completing the HtPasswdStore configuration. Please see for more hints on doing it right at the configuration cookbook page here: CookBook/AccountManagerPluginConfiguration

Alternatively login as user with ACCTMGR_CONFIG_ADMIN permission, that is inherited by ACCTMGR_ADMIN and TRAC_ADMIN as well). The configuration page at admin/accounts/config holds information about all currently configured authentication stores. I'm sure, that HtPasswdStore is enabled and already there, but at least you may notice an incorrect or missing option.

Please report anything you see while investigating the issue along the hints above, because it could help a lot, if you still cannot resolve it yourself by now.

comment:6 in reply to:  1 Changed 12 years ago by Steffen Hoffmann

Keywords: needinfo added
Priority: normallow

Replying to rjollos:

It looks like you need to setup a password store: AccountManagerPlugin/AuthStores.

Some required configuration might be missing or wrong, indeed.

As suggested before, this is likely a local installation/configuration issues. Without more facts I'll not allow your defect claim against this plugin to persist much longer.

Please provide feedback, to allow further progress - prove a defect or resolve the issue for you.

comment:7 Changed 12 years ago by Ryan J Ollos

It seems like we could really benefit from the reporter's trac.ini configuration here, for both the [account-manager] and [components] section. With that info, it might be possible to immediately spot the issue.

comment:8 Changed 12 years ago by adrya.stembridge@…

Here you are:

[account-manager]
htpasswd_file = /www/virtualhosts/trac/conf/trac.htpasswd
htpasswd_hash_type = md5
password_store = HtPasswdStore
user_lock_max_time = 0
[components]
acct_mgr.admin.* = enabled
acct_mgr.api.* = enabled
acct_mgr.db.sessionstore = enabled
acct_mgr.htfile.htdigeststore = disabled
acct_mgr.htfile.htpasswdstore = enabled
acct_mgr.http.httpauthstore = disabled
acct_mgr.notification.* = enabled
acct_mgr.pwhash.htdigesthashmethod = enabled
acct_mgr.pwhash.htpasswdhashmethod = disabled
acct_mgr.register.* = enabled
acct_mgr.svnserve.* = enabled
acct_mgr.svnserve.svnservepasswordstore = disabled
acct_mgr.web_ui.* = enabled
ckintegration.ckintegrationmodule = enabled
permredirect.* = enabled
trac.web.auth.loginmodule = disabled

comment:9 Changed 12 years ago by Ryan J Ollos

Which version of AccountManager are you running by now? The latest release version is 0.4.2.

comment:10 Changed 12 years ago by Ryan J Ollos

I'm not seeing any issues with your configuration, however hasienda would know better than I. I'll wait to hear if you are running the latest 0.4.2, or willing to upgrade and retest, before investigating any further.

comment:11 Changed 12 years ago by Ryan J Ollos

#9623 reports a similar issue.

comment:12 Changed 12 years ago by anonymous

@rjollos -- my version info is in the OP. Retyped here for convenience:

TracAccountManager 	0.3.2

Is 0.4.2 compatible with Trac 0.12?

comment:13 Changed 12 years ago by Ryan J Ollos

I wasn't sure if you might have updated since hasienda recommended it in comment:2.

Yes, AccountManager 0.4.2 is compatible with Trac 0.12, and it is highly recommended that you upgrade. We can't really take this defect any further until we know that it exists in AccountManager 0.4.2.

comment:14 Changed 12 years ago by anonymous

I don't see instructions on upgrading from 0.3.2 to 0.4.2 on the https://www.trac-hacks.org/wiki/AccountManagerPlugin page. Do I need to delete the existing version, then install the new version?

comment:15 Changed 12 years ago by Ryan J Ollos

You don't need to delete the old egg. You can install the new egg and restart Trac, and Trac will pickup the newer version. There is more info at t:TracPlugins if you want to become more comfortable with the installation process for eggs.

You'll need to read through accountmanagerplugin/trunk/README.update, since there are changes required to your trac.ini configuration. Feel free to post your configuration here after you've made the changes, if you'd like us to double check that you've made all the required changes.

One thing that immediately jumps out is that you are using htpasswd_file with AccountManager 0.3.2, but the htpasswd_file option is only valid with AccountManager 0.4.0 and later.

You see, this is almost certainly not a defect, but rather AccountManager 0.3.2 was looking for the password_file option, but you specified the 0.4.0 and later htpasswd_file option. See accountmanagerplugin/tags/acct_mgr-0.3.2/acct_mgr/htfile.py. Unfortunately, AccountManager 0.3.2 didn't protect against the password_file option being unset. I'm not sure if AccountManager 0.4.0 and later have protection in place.

comment:16 in reply to:  15 Changed 12 years ago by anonymous

Replying to rjollos:

[...] You'll need to read through accountmanagerplugin/trunk/README.update, since there are changes required to your trac.ini configuration.

On first glance your configuration looks fine (see CookBook/AccountManagerPluginConfiguration#HtPasswdStore). Still make sure to read through the README, but it looks like the problem here is that the wiki docs are for 0.4.0 and later (with footnotes pointing out changes from earlier versions), so you've used a 0.4.0 and later configuration with AccountManager 0.3.2.

comment:17 Changed 12 years ago by adrya.stembridge@…

Progress. I now see all of my users listed with the date of last login.

One thing that is slightly confusing to me is that there is an Update button on the user account info page. Should I see input fields for entering/editing email address, ect? For example, under Verification, I'm seeing text "No email address is registered for this account.", but no way of adding/editing an email address.

I'm not seeing any configuration for email addresses here: http://trac-hacks.org/wiki/CookBook/AccountManagerPluginConfiguration

What is the Update button for?

comment:18 Changed 12 years ago by anonymous

Here is a screenshot of what I'm seeing on the user account page: http://www2.picturepush.com/photo/a/11866765/640/11866765.png

comment:19 in reply to:  17 ; Changed 12 years ago by Ryan J Ollos

Replying to adrya.stembridge@gmail.com:

[...] One thing that is slightly confusing to me is that there is an Update button on the user account info page. Should I see input fields for entering/editing email address, ect? For example, under Verification, I'm seeing text "No email address is registered for this account.", but no way of adding/editing an email address.

That page has no inputs. I also found the term Update confusing, and it has been renamed to Refresh for release 0.5: #10742. I'd really like to just get rid of this page, and move the info to the Manage User Accounts page, as described in comment:11:ticket:10741.

I'm not seeing any configuration for email addresses here: http://trac-hacks.org/wiki/CookBook/AccountManagerPluginConfiguration

You enter email addresses from the Manager Users page. The interface is slightly confusing. For an existing user, enter the username and email address, and click Change. The fields you don't want to change can be left blank.

I'd eventually like to have in-place editing in the table, and eliminate the Change button.

What is the Update button for?

I just refreshes the information on the page. No more useful that hitting the browser refresh button.

Thanks for the usability feedback! I'm happy to continue answering any questions you have, but would you agree that the fundamental issue here was using a 0.4.0+ configuration with 0.3.2, and therefore we can resolve this ticket as invalid? If there is an outcome or lesson to be learned here, it is perhaps to make the wiki docs even more clear. If you have any specific suggestions, please let us know.

comment:20 in reply to:  19 ; Changed 12 years ago by anonymous

Replying to rjollos:

That page has no inputs. I also found the term Update confusing, and it has been renamed to Refresh for release 0.5: #10742. I'd really like to just get rid of this page, and move the info to the Manage User Accounts page, as described in [/ticket/10741#comment:11 comment:11:ticket:10741].

Thanks for the info regarding #10742 and the "Update" aka Refresh button.

You enter email addresses from the Manager Users page. The interface is slightly confusing. For an existing user, enter the username and email address, and click Change. The fields you don't want to change can be left blank.

I'm not finding a Manage Users page. Options under the Accounts section include:

    Configuration
    Notification
    Users

I think I've explored every link/button on these three menus, and am still not finding a Manage Users page.

comment:21 in reply to:  20 Changed 12 years ago by Ryan J Ollos

Replying to anonymous:

I'm not finding a Manage Users page.

It's the page you land on when clicking Users. The page title is Manage User Accounts.

Changed 12 years ago by Ryan J Ollos

Attachment: ManageUserAccounts.png added

comment:22 Changed 12 years ago by anonymous

My Users screen doesn't look exactly the same. Are you on Trac 1.0 or 0.12?

http://www2.picturepush.com/photo/a/11867855/640/11867855.png

Am I to manually type the existing user's account details on the right of the page above? (I cannot determine how to embed the picture). If this is the case if I misttype the username would I expect a new entry to be created with that misttyped username?

comment:23 in reply to:  22 ; Changed 12 years ago by adrya.stembridge@…

Resolution: worksforme
Status: newclosed

Am I to manually type the existing user's account details on the right of the page above? (I cannot determine how to embed the picture). If this is the case if I misttype the username would I expect a new entry to be created with that misttyped username?

Confirmed that is how this screen works (if an unknown user is entered, the system will error out).

I agree with you that being able to edit the data for existing users in the table would make more sense. Now that I know how it works, I can work with the interface. It was somewhat confusing to learn however.

Short of having Edit-in-Place for these fields, it would be nice if there were a way to edit the details after clicking the user's name - and then eliminating the Change button.

I believe this issue is resolved with upgrading to 0.4.2. Will close ticket as worksforme. Is there a formal method of submitting UI suggestions?

comment:24 in reply to:  22 Changed 12 years ago by Ryan J Ollos

Replying to anonymous:

My Users screen doesn't look exactly the same. Are you on Trac 1.0 or 0.12?

My screen capture was from Trac 1.1.1dev, and the layout changed a bit with Trac 1.0, moving the Add/Edit Account to be above the table. You'll see this change elsewhere on Trac 1.0 as well, such as the Permissions panel.

comment:25 in reply to:  23 ; Changed 12 years ago by Ryan J Ollos

Replying to adrya.stembridge@gmail.com:

Now that I know how it works, I can work with the interface. It was somewhat confusing to learn however.

Yeah, we have some work to do on the interface. Most of the current interface precedes the work of hasienda, and I think that he and I would both like to give it a bit of a makeover.

I believe this issue is resolved with upgrading to 0.4.2.

Great. Nice that we can close this out. Even better that you are up and running now.

Is there a formal method of submitting UI suggestions?

You can open a ticket if you'd like. Please try to keep each ticket you open focused on a particular area of the UI.

comment:26 in reply to:  25 Changed 12 years ago by Ryan J Ollos

Replying to rjollos:

Is there a formal method of submitting UI suggestions?

You can open a ticket if you'd like. Please try to keep each ticket you open focused on a particular area of the UI.

Also, I've opened several tickets over the last several days, so please check to make sure there isn't an existing ticket that overlaps with whatever UI suggestions you have.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.