1 Description of multiuser patch
2 ==============================
3 This file provides some HowTos and internals about the new multiuser
4 functionality of MLDonkey. The goal is to provide a p2p-service to be
5 used by more than user and where each user has its own environment
6 provided by the daemon.
8 Some basics and definitions
9 ===========================
10 User "admin" and all users belonging to a group where group_admin = true can
11 see all files in any case and can use all functions of MLDonkey.
13 file_owner in this text means the user which owns a downloading file,
14 file_group means the group the file belongs to, file_owner must be a member of
15 this group, both values are saved in files.ini.
17 New options (displayed options are default values)
18 ==================================================
21 - "users" is kept unchanged for compatibility, all users from "users2"
22 are saved in "users" as well, so password are updated.
23 - "users2" is extended with these settings:
25 A list of groups the user belongs to, this user can view all files
26 which belong to one of the groups
29 The default group of the user, the user must also be a member of this
30 group. File_group of new downloads started by the user are automatically
31 assigned to this value. This value can be None, this means the file is a
32 private one only visible to the file_owner (and admins, of course).
33 user_default_group = mldonkey
35 E-mail address to sent commit notifications to. Global option "mail"
36 can still be used for admins, if both addresses match only one mail is sent.
39 Commit files to <incoming>/<user_commit_dir>
40 The current incoming directory is appended with user_commit_dir.
41 All incoming dirs are shared recursively now to share these files
42 committed into user specific dirs.
45 Like global option max_concurrent_downloads this implements a user-specific
46 limit of the maximum number of concurrent files a user can download. Other
47 downloads are queued, this is done by round-robin. If the sum of
48 user_max_concurrent_downloads from all users is bigger than
49 max_concurrent_downloads less downloads than user_max_concurrent_downloads
50 are in downloading state. 0 means no user-specific limit.
51 Users can change file priorities the control which files are not queued.
52 user_max_concurrent_downloads = 0
55 At least one group named "mldonkey" with group_admin = true must exist
56 and will be re-created on startup if missing.
58 Option to control if the group has admin rights. All users belonging to such a
59 group have the same rights as user "admin".
65 - each file has two new options in files.ini
66 file_owner: the incoming directory of the owner is used for commit,
67 if the user does not exist "admin" is used. If this data
68 field does not exist, the file will belong to user "admin".
69 file_group: default value for a new download is user_default_group
70 if file_owner is not member of file_group or the group does not
71 exist, the user_default_group of file_owner is used.
75 These two options control the display of user/group column in HTML, vd
76 html_mods_vd_user false
77 html_mods_vd_group false
80 Commands to control multiuser features/data
81 ===========================================
83 change group of download <num> to <group>, group = none for private file
86 change owner of download <num> to <user>
89 print default group of logged-in user
91 groupadd <group> <admin: true | false>
92 add new mldonkey group, only admin users can use this command
94 groupadmin <group> <admin: true | false>
95 change group admin status, only admin users can use this command
98 remove an unused mldonkey group, only admin users can use this command
99 only possible if group has no members
102 print groups of logged-in user
107 useradd <user> <passwd>
108 add new mldonkey user/change user password, only admin users can use this command
110 usercommit <user> <dir>
111 change user specific commit directory
114 remove a mldonkey user, only admin users can use this command, user "admin" can not be removed
115 deleting a user is only possible if the user does not own any downloads
117 userdgroup <user> <group|None>
118 change user default group
121 change number of allowed concurrent downloads, only admin users can use this command
123 usergroupadd <user> <group>
124 add a group to a mldonkey user, only admin users can use this command
126 usergroupdel <user> <group>
127 remove a group from a mldonkey user
129 usermail <user> <mail>
130 change user mail address
133 use this command in HTML interface for a small GUI to control users
136 print logged-in user name
139 Updating from a non-multiuser MLDonkey
140 ======================================
141 When updating all files will have file_owner "admin" and file_group "mldonkey".
142 All existing users will have user_default_group = "mldonkey" and
143 user_groups = ["mldonkey"]. This means all users can use all features of
144 MLDonkey and see all files in use by MLDonkey core, just like before.
146 To hide user downloads from each other, create a new group with
147 group_admin = false and assign all users to this group and remove them
148 from all admin groups
153 - file_completed_cmd has new environment variables $FILE_OWNER and $FILE_GROUP
154 - remove option enable_user_config, replaced by membership of admin groups