<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://kibale.unm.edu/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=KarlPinc</id>
	<title>KCPWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://kibale.unm.edu/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=KarlPinc"/>
	<link rel="alternate" type="text/html" href="https://kibale.unm.edu/wiki/Special:Contributions/KarlPinc"/>
	<updated>2026-08-05T07:19:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://kibale.unm.edu/w/index.php?title=Media_Repository_Administration&amp;diff=16</id>
		<title>Media Repository Administration</title>
		<link rel="alternate" type="text/html" href="https://kibale.unm.edu/w/index.php?title=Media_Repository_Administration&amp;diff=16"/>
		<updated>2025-08-29T22:46:41Z</updated>

		<summary type="html">&lt;p&gt;KarlPinc: /* User and group management tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The KCP media repository controls access using the standard Unix&lt;br /&gt;
[https://www.gnu.org/software/coreutils/manual/html_node/Changing-file-attributes.html  ownership] and&lt;br /&gt;
[https://www.gnu.org/software/coreutils/manual/html_node/File-permissions.html permission] system.&lt;br /&gt;
Specifically, it uses the [https://flylib.com/books/en/4.150.1.60/1/ User-Private-Group] (UPG) idiom.&lt;br /&gt;
This scheme works by associating a group with a directory and giving users, users that are allowed to make changes, membership in the group.&lt;br /&gt;
In this document such groups are called &amp;quot;media groups&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are in a media group you have read/write access to the group&#039;s media files.&lt;br /&gt;
Otherwise, you have read access -- or no access.&lt;br /&gt;
&lt;br /&gt;
This is a simple approach, and has some limitations.&lt;br /&gt;
&lt;br /&gt;
* Any given file can be in only one directory and is associated with only a single group.  Categorizing a file as modifiable by multiple groups is not possible.&lt;br /&gt;
&lt;br /&gt;
* Files and directories have an owner as well as a group.  Typically the owner has read/write permissions.  When a file or directory&#039;s owner is not a member of the file or directory&#039;s group, looking solely at group membership does not reflect the owner&#039;s permissions.&lt;br /&gt;
&lt;br /&gt;
* The UPG idiom assumes that files remain in the directories in which they were initially put, or a sub-directory.  It works because new files are given the group of the directory in which they are placed.  Moving files between directories that belong to different groups requires that the file&#039;s groups be manually changed to reflect the group of the new containing directory.  At least this is required if directories are assumed to control permission, so that who has access to what can be readily determined by where a file is placed in the directory hierarchy.  This problem is mitigated with the use of a bespoke auditing tool, kcpm-audit.&lt;br /&gt;
&lt;br /&gt;
* Membership in a group gives read/write permissions but says nothing about who can read but not change a file.  To grant or deny read-only permission a different mechanism is used, granting or denying access to &amp;quot;other&amp;quot;, anybody who&#039;s not either the file&#039;s owner or a group member.  So determining who has read-only access is different from, and more complicated than determining who has read-write access.  To obtain any kind of access to a file a user must have at least read permissions on the directory containing the file, and all of the parent directories.&lt;br /&gt;
&lt;br /&gt;
Although standard Unix command line tools are available for use and&lt;br /&gt;
can do the job, to simplify and standardize a number of bespoke command&lt;br /&gt;
line tools are made available to do things like create media user&lt;br /&gt;
accounts, create permission controlled media directories, and other&lt;br /&gt;
management tasks.&lt;br /&gt;
&lt;br /&gt;
The system has some naming conventions which aim to simplify&lt;br /&gt;
management and system use.  These are enforced when using the bespoke&lt;br /&gt;
management command line tools.  The conventions are:&lt;br /&gt;
&lt;br /&gt;
* Directories that introduce permission restrictions have names that end in either &amp;quot;_public&amp;quot; or &amp;quot;_private&amp;quot;.  The ones ending in &amp;quot;_public&amp;quot; contain files that are readable by anyone with a media login.  The ones ending in &amp;quot;_private&amp;quot; are readable only by media logins who are members of the directory&#039;s group.&lt;br /&gt;
&lt;br /&gt;
* The groups that categorize access to media files, in which media users are made members, begin with &amp;quot;m-&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== About alternative permission control mechanisms ===&lt;br /&gt;
&lt;br /&gt;
[https://manpages.debian.org/bookworm/acl/acl.5.en.html ACL]s are a&lt;br /&gt;
permission system that can be used in conjunction with the traditional&lt;br /&gt;
Unix permission system.  ACLs provide fine-grained control over who&lt;br /&gt;
has permission to do exactly what to each file.  But ACL use is&lt;br /&gt;
non-obvious, and ACL permissions are unlikely to be visible in&lt;br /&gt;
off-the-shelf graphical remote access mechanisms which use SFTP.&lt;br /&gt;
So while ACLs are available their use is not recommended.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Groups Built-In to the System ==&lt;br /&gt;
&lt;br /&gt;
The media repository&amp;lt; system is constructed of 2 core groups.&lt;br /&gt;
These are the groups which the operating system is aware of and which provide it control.&lt;br /&gt;
&lt;br /&gt;
;sftp-only&lt;br /&gt;
: Members of this group are &amp;quot;media logins&amp;quot;. A media login is a regular Unix login that is in the &amp;lt;code&amp;gt;sftp-only&amp;lt;/code&amp;gt; group. These logins cannot reach the Unix shell, which processes Unix commands.&lt;br /&gt;
&lt;br /&gt;
;media-admin&lt;br /&gt;
: Members of this group have permission to use the bespoke programs which require elevated system-level privileges, like create new logins or groups.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Working from the Unix command line ==&lt;br /&gt;
&lt;br /&gt;
=== File Locations and Disk Space Management ===&lt;br /&gt;
&lt;br /&gt;
All media files are located in the &amp;lt;code&amp;gt;/srv/media/&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
The amount of available space, and space already used, can be seen&lt;br /&gt;
with:&lt;br /&gt;
&lt;br /&gt;
  [https://www.gnu.org/software/coreutils/manual/html_node/df-invocation.html df] -h /srv/media&lt;br /&gt;
&lt;br /&gt;
=== Using the Unix Command Line ===&lt;br /&gt;
&lt;br /&gt;
All the command line tools take a &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; argument, which&lt;br /&gt;
causes the command to display a brief summary of its functionality and&lt;br /&gt;
arguments.  The bespoke command line tools generally have no other&lt;br /&gt;
documentation.  You will need to execute them with the&lt;br /&gt;
&amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; argument to determine their usage and arguments.&lt;br /&gt;
Documentation to the standard Unix command line tools are linked&lt;br /&gt;
herein.&lt;br /&gt;
&lt;br /&gt;
=== Permission Errors ===&lt;br /&gt;
&lt;br /&gt;
Some of the standard Unix commands, like &amp;lt;code&amp;gt;chown&amp;lt;/code&amp;gt;, which&lt;br /&gt;
changes file or directory ownership, requires special permission to&lt;br /&gt;
run.  If a &amp;quot;permission denied&amp;quot; error is received, try running the&lt;br /&gt;
command with the word &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; placed in front.&lt;br /&gt;
&lt;br /&gt;
When specifying a file or directory, &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; will require&lt;br /&gt;
the fully qualified path -- a pathname that starts with&lt;br /&gt;
&amp;lt;code&amp;gt;/srv/media/&amp;lt;/code&amp;gt; and lists all intermediate directories.&lt;br /&gt;
&lt;br /&gt;
=== Difficulties Involving Adding Groups ===&lt;br /&gt;
&lt;br /&gt;
When a user is added to or removed from a group, the change does not take effect&lt;br /&gt;
until after the user logs in.&lt;br /&gt;
&lt;br /&gt;
This matters, among other times, when adding your login to a group.  Your login normally does not have permission to work with a group when your login is not a group member.  After adding yourself to a group it is usually best to login again to gain immediate access to the group.&lt;br /&gt;
&lt;br /&gt;
== User and group management tools ==&lt;br /&gt;
&lt;br /&gt;
;kcpm-adduser&lt;br /&gt;
: Creates a media user (a member of the sftp-only group), or adds any user to a media group.&lt;br /&gt;
  &lt;br /&gt;
;kcpm-deluser&lt;br /&gt;
: Deletes a media user, if the user owns no files. Or removes a media user from a media group.&lt;br /&gt;
&lt;br /&gt;
;kcpm-user-list&lt;br /&gt;
: Lists all members of the sftp-only group, and the groups they are in.&lt;br /&gt;
&lt;br /&gt;
;kcpm-group-list&lt;br /&gt;
: Lists all media groups, and the users they contain.  Media groups are identified by a &amp;quot;m-&amp;quot; prefix.&lt;br /&gt;
&lt;br /&gt;
;kcpm-addgroup&lt;br /&gt;
:Creates a media group.&lt;br /&gt;
&lt;br /&gt;
;kcpm-delgroup&lt;br /&gt;
: Deletes a media group, only if there are no members, and no files in the group.&lt;br /&gt;
&lt;br /&gt;
== Directory and file management tools ==&lt;br /&gt;
&lt;br /&gt;
=== CAUTION ===&lt;br /&gt;
&lt;br /&gt;
Do not move files between directories which are in different groups.&lt;br /&gt;
If you do, by a method other than &amp;lt;code&amp;gt;kcpm-mv&amp;lt;/code&amp;gt;, the file&#039;s group will not&lt;br /&gt;
reflect the group of its containing directory.  That means that when&lt;br /&gt;
a file is moved to a publicly readable directory it can still be&lt;br /&gt;
modified by the group members of the origin directory, and is not&lt;br /&gt;
modifiable by the group members of the containing directory.&lt;br /&gt;
&lt;br /&gt;
If you do move a file, the group of the file must be changed to&lt;br /&gt;
match the group of its containing directory.  As an alternative to&lt;br /&gt;
moving (renaming), copy the file and delete the original.  (This&lt;br /&gt;
will involve downloading and re-uploading, unless you&#039;re working&lt;br /&gt;
from the Unix prompt.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;kcpm-audit&amp;lt;/code&amp;gt; can be run to report on such discrepancies, and to change&lt;br /&gt;
group membership of files to reflect that of their containing&lt;br /&gt;
directory.&lt;br /&gt;
&lt;br /&gt;
Directories are rooted at a [https://www.gnu.org/software/coreutils/manual/html_node/Directory-Setuid-and-Setgid.html setgid] directory, group &amp;lt;code&amp;gt;sftp-only&amp;lt;/code&amp;gt;, so all&lt;br /&gt;
sub-directories are setgid.&lt;br /&gt;
&lt;br /&gt;
=== kcpm-mkmdir ===&lt;br /&gt;
&lt;br /&gt;
Given a group and a directory name, makes a directory in the group.&lt;br /&gt;
The group then controls access to content added to the directory.&lt;br /&gt;
&amp;lt;code&amp;gt;--private&amp;lt;/code&amp;gt; makes a directory with a name ending in &amp;quot;_private&amp;quot;.&lt;br /&gt;
&amp;lt;code&amp;gt;--public&amp;lt;/code&amp;gt; makes a  directory with a name ending in &amp;quot;_public&amp;quot;.&lt;br /&gt;
The *_public directory is readable by anyone with a login.  The *_private&lt;br /&gt;
directory is readable only by members of the group.&lt;br /&gt;
&lt;br /&gt;
This is a convenience utility.  The &amp;lt;code&amp;gt;chgrp&amp;lt;/code&amp;gt; command can be used to&lt;br /&gt;
change the group of a directory, and &amp;lt;code&amp;gt;chmod o-x&amp;lt;/code&amp;gt; will make a&lt;br /&gt;
directory private.  The *_public and *_private naming conventions&lt;br /&gt;
are recommended.  They provide clear guidance as to which&lt;br /&gt;
directories control access.&lt;br /&gt;
&lt;br /&gt;
=== kcpm-mv ===&lt;br /&gt;
Move or rename files or directories.&lt;br /&gt;
Takes care of re-assigning groups when moving files.&lt;br /&gt;
&lt;br /&gt;
This is a convenience utility.  The &amp;lt;code&amp;gt;chgrp -R&amp;lt;/code&amp;gt; command can be used&lt;br /&gt;
to (recursively) change group permissions.  Files should be in the&lt;br /&gt;
group of their containing directory, so take care using&lt;br /&gt;
&amp;lt;code&amp;gt;-R&amp;lt;/code&amp;gt; when nested directories are in different groups.&lt;br /&gt;
&lt;br /&gt;
=== kcpm-audit ===&lt;br /&gt;
Given a directory, recursively report on unexpected permissions structures.&lt;br /&gt;
* Directories named *_public that are in the group of the parent&lt;br /&gt;
* Directories named *_public that are private (o-x)&lt;br /&gt;
* Directories named *_private that are not private (o+x)&lt;br /&gt;
* Files that are not in the group of their parent directory&lt;br /&gt;
* Files or directories that are owned by a user who is not a member of the file or directory&#039;s group.&lt;br /&gt;
&lt;br /&gt;
Or, changes permissions to fix all of the above.&lt;br /&gt;
    &lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/chgrp-invocation.html chgrp] (-R) ... ===&lt;br /&gt;
&lt;br /&gt;
Change the group&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/chmod-invocation.html chmod] o-x ... ===&lt;br /&gt;
&lt;br /&gt;
Remove public access from a directory.&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/chmod-invocation.html chmod] o+x ... ===&lt;br /&gt;
&lt;br /&gt;
Add public access to a directory.&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/rm-invocation.html rm] ===&lt;br /&gt;
&lt;br /&gt;
Delete a file or a directory structure.&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/rmdir-invocation.html rmdir] ===&lt;br /&gt;
&lt;br /&gt;
Delete an empty directory.&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/mkdir-invocation.html mkdir] ===&lt;br /&gt;
&lt;br /&gt;
Make non-media-controlled directories&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/findutils/manual/html_mono/find.html find] . -group name ===&lt;br /&gt;
&lt;br /&gt;
Find everything belonging to a group.  Find has many options, and&lt;br /&gt;
can even be used to execute commands on the files found.  It is&lt;br /&gt;
useful for things like bulk changing of file ownership.&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/ls-invocation.html ls] -lhR ===&lt;br /&gt;
&lt;br /&gt;
Show everything in the file system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Techniques ==&lt;br /&gt;
&lt;br /&gt;
Anything put in the top-level directory are read/writable to anyone&lt;br /&gt;
with a login.&lt;br /&gt;
&lt;br /&gt;
=== Make a test login to test access ===&lt;br /&gt;
&lt;br /&gt;
A test login can be created, and put into any set of groups.&lt;br /&gt;
This allows for testing of access, and emulating what a user who&#039;s in&lt;br /&gt;
the same set of groups is allowed to do.&lt;br /&gt;
&lt;br /&gt;
=== Layer directories to control access ===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Regular&amp;quot; directories can be used at any level to structure content.&lt;br /&gt;
&lt;br /&gt;
If you have topdir_private/subdir, in respective groups topdir and&lt;br /&gt;
subdir, consider the content of subdir.  Only topdir members have&lt;br /&gt;
access.  Members of subdir have read/write access, and topdir members&lt;br /&gt;
have read-only access.&lt;/div&gt;</summary>
		<author><name>KarlPinc</name></author>
	</entry>
	<entry>
		<id>https://kibale.unm.edu/w/index.php?title=Main_Page&amp;diff=15</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://kibale.unm.edu/w/index.php?title=Main_Page&amp;diff=15"/>
		<updated>2025-04-05T03:23:46Z</updated>

		<summary type="html">&lt;p&gt;KarlPinc: /* The KCPDB -- The Kibale Chimpanzee Project DataBase */ Add various user interfaces&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The KCPDB -- The Kibale Chimpanzee Project DataBase ==&lt;br /&gt;
* Access the database&lt;br /&gt;
** Preferred interfaces&lt;br /&gt;
*** [https://kibale.unm.edu/programs/sql Preferred SQL interface]&lt;br /&gt;
*** [https://kibale.unm.edu/programs/upload Preferred upload interface]&lt;br /&gt;
*** [https://kibale.unm.edu/programs/logout Logout from preferred interfaces]&lt;br /&gt;
** Other interfaces&lt;br /&gt;
*** [https://kibale.unm.edu/adminer/ Adminer generic Postgres interface]&lt;br /&gt;
*** [https://kibale.unm.edu/pgadmin/ PgAdmin generic Postgres interface]&lt;br /&gt;
*** [https://kibale.unm.edu/programs/ Complete set of bespoke (PGWUI) Postgres interfaces]&lt;br /&gt;
* Documentation&lt;br /&gt;
** [[Media Archive|The Media Archive]]&lt;br /&gt;
* [[Administration|Administrative Tasks]]&lt;/div&gt;</summary>
		<author><name>KarlPinc</name></author>
	</entry>
	<entry>
		<id>https://kibale.unm.edu/w/index.php?title=Media_Repository_Administration&amp;diff=14</id>
		<title>Media Repository Administration</title>
		<link rel="alternate" type="text/html" href="https://kibale.unm.edu/w/index.php?title=Media_Repository_Administration&amp;diff=14"/>
		<updated>2025-02-08T17:57:04Z</updated>

		<summary type="html">&lt;p&gt;KarlPinc: /* Working from the Unix command line */ Note group membership is not changed until login&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The KCP media repository controls access using the standard Unix&lt;br /&gt;
[https://www.gnu.org/software/coreutils/manual/html_node/Changing-file-attributes.html  ownership] and&lt;br /&gt;
[https://www.gnu.org/software/coreutils/manual/html_node/File-permissions.html permission] system.&lt;br /&gt;
Specifically, it uses the [https://flylib.com/books/en/4.150.1.60/1/ User-Private-Group] (UPG) idiom.&lt;br /&gt;
This scheme works by associating a group with a directory and giving users, users that are allowed to make changes, membership in the group.&lt;br /&gt;
In this document such groups are called &amp;quot;media groups&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are in a media group you have read/write access to the group&#039;s media files.&lt;br /&gt;
Otherwise, you have read access -- or no access.&lt;br /&gt;
&lt;br /&gt;
This is a simple approach, and has some limitations.&lt;br /&gt;
&lt;br /&gt;
* Any given file can be in only one directory and is associated with only a single group.  Categorizing a file as modifiable by multiple groups is not possible.&lt;br /&gt;
&lt;br /&gt;
* Files and directories have an owner as well as a group.  Typically the owner has read/write permissions.  When a file or directory&#039;s owner is not a member of the file or directory&#039;s group, looking solely at group membership does not reflect the owner&#039;s permissions.&lt;br /&gt;
&lt;br /&gt;
* The UPG idiom assumes that files remain in the directories in which they were initially put, or a sub-directory.  It works because new files are given the group of the directory in which they are placed.  Moving files between directories that belong to different groups requires that the file&#039;s groups be manually changed to reflect the group of the new containing directory.  At least this is required if directories are assumed to control permission, so that who has access to what can be readily determined by where a file is placed in the directory hierarchy.  This problem is mitigated with the use of a bespoke auditing tool, kcpm-audit.&lt;br /&gt;
&lt;br /&gt;
* Membership in a group gives read/write permissions but says nothing about who can read but not change a file.  To grant or deny read-only permission a different mechanism is used, granting or denying access to &amp;quot;other&amp;quot;, anybody who&#039;s not either the file&#039;s owner or a group member.  So determining who has read-only access is different from, and more complicated than determining who has read-write access.  To obtain any kind of access to a file a user must have at least read permissions on the directory containing the file, and all of the parent directories.&lt;br /&gt;
&lt;br /&gt;
Although standard Unix command line tools are available for use and&lt;br /&gt;
can do the job, to simplify and standardize a number of bespoke command&lt;br /&gt;
line tools are made available to do things like create media user&lt;br /&gt;
accounts, create permission controlled media directories, and other&lt;br /&gt;
management tasks.&lt;br /&gt;
&lt;br /&gt;
The system has some naming conventions which aim to simplify&lt;br /&gt;
management and system use.  These are enforced when using the bespoke&lt;br /&gt;
management command line tools.  The conventions are:&lt;br /&gt;
&lt;br /&gt;
* Directories that introduce permission restrictions have names that end in either &amp;quot;_public&amp;quot; or &amp;quot;_private&amp;quot;.  The ones ending in &amp;quot;_public&amp;quot; contain files that are readable by anyone with a media login.  The ones ending in &amp;quot;_private&amp;quot; are readable only by media logins who are members of the directory&#039;s group.&lt;br /&gt;
&lt;br /&gt;
* The groups that categorize access to media files, in which media users are made members, begin with &amp;quot;m-&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== About alternative permission control mechanisms ===&lt;br /&gt;
&lt;br /&gt;
[https://manpages.debian.org/bookworm/acl/acl.5.en.html ACL]s are a&lt;br /&gt;
permission system that can be used in conjunction with the traditional&lt;br /&gt;
Unix permission system.  ACLs provide fine-grained control over who&lt;br /&gt;
has permission to do exactly what to each file.  But ACL use is&lt;br /&gt;
non-obvious, and ACL permissions are unlikely to be visible in&lt;br /&gt;
off-the-shelf graphical remote access mechanisms which use SFTP.&lt;br /&gt;
So while ACLs are available their use is not recommended.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Groups Built-In to the System ==&lt;br /&gt;
&lt;br /&gt;
The media repository&amp;lt; system is constructed of 2 core groups.&lt;br /&gt;
These are the groups which the operating system is aware of and which provide it control.&lt;br /&gt;
&lt;br /&gt;
;sftp-only&lt;br /&gt;
: Members of this group are &amp;quot;media logins&amp;quot;. A media login is a regular Unix login that is in the &amp;lt;code&amp;gt;sftp-only&amp;lt;/code&amp;gt; group. These logins cannot reach the Unix shell, which processes Unix commands.&lt;br /&gt;
&lt;br /&gt;
;media-admin&lt;br /&gt;
: Members of this group have permission to use the bespoke programs which require elevated system-level privileges, like create new logins or groups.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Working from the Unix command line ==&lt;br /&gt;
&lt;br /&gt;
=== File Locations and Disk Space Management ===&lt;br /&gt;
&lt;br /&gt;
All media files are located in the &amp;lt;code&amp;gt;/srv/media/&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
The amount of available space, and space already used, can be seen&lt;br /&gt;
with:&lt;br /&gt;
&lt;br /&gt;
  [https://www.gnu.org/software/coreutils/manual/html_node/df-invocation.html df] -h /srv/media&lt;br /&gt;
&lt;br /&gt;
=== Using the Unix Command Line ===&lt;br /&gt;
&lt;br /&gt;
All the command line tools take a &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; argument, which&lt;br /&gt;
causes the command to display a brief summary of its functionality and&lt;br /&gt;
arguments.  The bespoke command line tools generally have no other&lt;br /&gt;
documentation.  You will need to execute them with the&lt;br /&gt;
&amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; argument to determine their usage and arguments.&lt;br /&gt;
Documentation to the standard Unix command line tools are linked&lt;br /&gt;
herein.&lt;br /&gt;
&lt;br /&gt;
=== Permission Errors ===&lt;br /&gt;
&lt;br /&gt;
Some of the standard Unix commands, like &amp;lt;code&amp;gt;chown&amp;lt;/code&amp;gt;, which&lt;br /&gt;
changes file or directory ownership, requires special permission to&lt;br /&gt;
run.  If a &amp;quot;permission denied&amp;quot; error is received, try running the&lt;br /&gt;
command with the word &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; placed in front.&lt;br /&gt;
&lt;br /&gt;
When specifying a file or directory, &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; will require&lt;br /&gt;
the fully qualified path -- a pathname that starts with&lt;br /&gt;
&amp;lt;code&amp;gt;/srv/media/&amp;lt;/code&amp;gt; and lists all intermediate directories.&lt;br /&gt;
&lt;br /&gt;
=== Difficulties Involving Adding Groups ===&lt;br /&gt;
&lt;br /&gt;
When a user is added to or removed from a group, the change does not take effect&lt;br /&gt;
until after the user logs in.&lt;br /&gt;
&lt;br /&gt;
This matters, among other times, when adding your login to a group.  Your login normally does not have permission to work with a group when your login is not a group member.  After adding yourself to a group it is usually best to login again to gain immediate access to the group.&lt;br /&gt;
&lt;br /&gt;
== User and group management tools ==&lt;br /&gt;
&lt;br /&gt;
;kcpm-adduser&lt;br /&gt;
: Creates a media user, or adds a media user to a media group.&lt;br /&gt;
  &lt;br /&gt;
;kcpm-deluser&lt;br /&gt;
: Deletes a media user, if the user owns no files. Or removes a media user from a media group.&lt;br /&gt;
&lt;br /&gt;
;kcpm-user-list&lt;br /&gt;
: Lists all members of the sftp-only group, and the groups they are in.&lt;br /&gt;
&lt;br /&gt;
;kcpm-group-list&lt;br /&gt;
: Lists all media groups, and the users they contain.  Media groups are identified by a &amp;quot;m-&amp;quot; prefix.&lt;br /&gt;
&lt;br /&gt;
;kcpm-addgroup&lt;br /&gt;
:Creates a media group.&lt;br /&gt;
&lt;br /&gt;
;kcpm-delgroup&lt;br /&gt;
: Deletes a media group, only if there are no members, and no files in the group.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Directory and file management tools ==&lt;br /&gt;
&lt;br /&gt;
=== CAUTION ===&lt;br /&gt;
&lt;br /&gt;
Do not move files between directories which are in different groups.&lt;br /&gt;
If you do, by a method other than &amp;lt;code&amp;gt;kcpm-mv&amp;lt;/code&amp;gt;, the file&#039;s group will not&lt;br /&gt;
reflect the group of its containing directory.  That means that when&lt;br /&gt;
a file is moved to a publicly readable directory it can still be&lt;br /&gt;
modified by the group members of the origin directory, and is not&lt;br /&gt;
modifiable by the group members of the containing directory.&lt;br /&gt;
&lt;br /&gt;
If you do move a file, the group of the file must be changed to&lt;br /&gt;
match the group of its containing directory.  As an alternative to&lt;br /&gt;
moving (renaming), copy the file and delete the original.  (This&lt;br /&gt;
will involve downloading and re-uploading, unless you&#039;re working&lt;br /&gt;
from the Unix prompt.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;kcpm-audit&amp;lt;/code&amp;gt; can be run to report on such discrepancies, and to change&lt;br /&gt;
group membership of files to reflect that of their containing&lt;br /&gt;
directory.&lt;br /&gt;
&lt;br /&gt;
Directories are rooted at a [https://www.gnu.org/software/coreutils/manual/html_node/Directory-Setuid-and-Setgid.html setgid] directory, group &amp;lt;code&amp;gt;sftp-only&amp;lt;/code&amp;gt;, so all&lt;br /&gt;
sub-directories are setgid.&lt;br /&gt;
&lt;br /&gt;
=== kcpm-mkmdir ===&lt;br /&gt;
&lt;br /&gt;
Given a group and a directory name, makes a directory in the group.&lt;br /&gt;
The group then controls access to content added to the directory.&lt;br /&gt;
&amp;lt;code&amp;gt;--private&amp;lt;/code&amp;gt; makes a directory with a name ending in &amp;quot;_private&amp;quot;.&lt;br /&gt;
&amp;lt;code&amp;gt;--public&amp;lt;/code&amp;gt; makes a  directory with a name ending in &amp;quot;_public&amp;quot;.&lt;br /&gt;
The *_public directory is readable by anyone with a login.  The *_private&lt;br /&gt;
directory is readable only by members of the group.&lt;br /&gt;
&lt;br /&gt;
This is a convenience utility.  The &amp;lt;code&amp;gt;chgrp&amp;lt;/code&amp;gt; command can be used to&lt;br /&gt;
change the group of a directory, and &amp;lt;code&amp;gt;chmod o-x&amp;lt;/code&amp;gt; will make a&lt;br /&gt;
directory private.  The *_public and *_private naming conventions&lt;br /&gt;
are recommended.  They provide clear guidance as to which&lt;br /&gt;
directories control access.&lt;br /&gt;
&lt;br /&gt;
=== kcpm-mv ===&lt;br /&gt;
Move or rename files or directories.&lt;br /&gt;
Takes care of re-assigning groups when moving files.&lt;br /&gt;
&lt;br /&gt;
This is a convenience utility.  The &amp;lt;code&amp;gt;chgrp -R&amp;lt;/code&amp;gt; command can be used&lt;br /&gt;
to (recursively) change group permissions.  Files should be in the&lt;br /&gt;
group of their containing directory, so take care using&lt;br /&gt;
&amp;lt;code&amp;gt;-R&amp;lt;/code&amp;gt; when nested directories are in different groups.&lt;br /&gt;
&lt;br /&gt;
=== kcpm-audit ===&lt;br /&gt;
Given a directory, recursively report on unexpected permissions structures.&lt;br /&gt;
* Directories named *_public that are in the group of the parent&lt;br /&gt;
* Directories named *_public that are private (o-x)&lt;br /&gt;
* Directories named *_private that are not private (o+x)&lt;br /&gt;
* Files that are not in the group of their parent directory&lt;br /&gt;
* Files or directories that are owned by a user who is not a member of the file or directory&#039;s group.&lt;br /&gt;
&lt;br /&gt;
Or, changes permissions to fix all of the above.&lt;br /&gt;
    &lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/chgrp-invocation.html chgrp] (-R) ... ===&lt;br /&gt;
&lt;br /&gt;
Change the group&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/chmod-invocation.html chmod] o-x ... ===&lt;br /&gt;
&lt;br /&gt;
Remove public access from a directory.&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/chmod-invocation.html chmod] o+x ... ===&lt;br /&gt;
&lt;br /&gt;
Add public access to a directory.&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/rm-invocation.html rm] ===&lt;br /&gt;
&lt;br /&gt;
Delete a file or a directory structure.&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/rmdir-invocation.html rmdir] ===&lt;br /&gt;
&lt;br /&gt;
Delete an empty directory.&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/mkdir-invocation.html mkdir] ===&lt;br /&gt;
&lt;br /&gt;
Make non-media-controlled directories&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/findutils/manual/html_mono/find.html find] . -group name ===&lt;br /&gt;
&lt;br /&gt;
Find everything belonging to a group.  Find has many options, and&lt;br /&gt;
can even be used to execute commands on the files found.  It is&lt;br /&gt;
useful for things like bulk changing of file ownership.&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/ls-invocation.html ls] -lhR ===&lt;br /&gt;
&lt;br /&gt;
Show everything in the file system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Techniques ==&lt;br /&gt;
&lt;br /&gt;
Anything put in the top-level directory are read/writable to anyone&lt;br /&gt;
with a login.&lt;br /&gt;
&lt;br /&gt;
=== Make a test login to test access ===&lt;br /&gt;
&lt;br /&gt;
A test login can be created, and put into any set of groups.&lt;br /&gt;
This allows for testing of access, and emulating what a user who&#039;s in&lt;br /&gt;
the same set of groups is allowed to do.&lt;br /&gt;
&lt;br /&gt;
=== Layer directories to control access ===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Regular&amp;quot; directories can be used at any level to structure content.&lt;br /&gt;
&lt;br /&gt;
If you have topdir_private/subdir, in respective groups topdir and&lt;br /&gt;
subdir, consider the content of subdir.  Only topdir members have&lt;br /&gt;
access.  Members of subdir have read/write access, and topdir members&lt;br /&gt;
have read-only access.&lt;/div&gt;</summary>
		<author><name>KarlPinc</name></author>
	</entry>
	<entry>
		<id>https://kibale.unm.edu/w/index.php?title=Media_Repository_Administration&amp;diff=13</id>
		<title>Media Repository Administration</title>
		<link rel="alternate" type="text/html" href="https://kibale.unm.edu/w/index.php?title=Media_Repository_Administration&amp;diff=13"/>
		<updated>2025-02-08T17:37:10Z</updated>

		<summary type="html">&lt;p&gt;KarlPinc: /* Directory and file management tools */ Clean up formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The KCP media repository controls access using the standard Unix&lt;br /&gt;
[https://www.gnu.org/software/coreutils/manual/html_node/Changing-file-attributes.html  ownership] and&lt;br /&gt;
[https://www.gnu.org/software/coreutils/manual/html_node/File-permissions.html permission] system.&lt;br /&gt;
Specifically, it uses the [https://flylib.com/books/en/4.150.1.60/1/ User-Private-Group] (UPG) idiom.&lt;br /&gt;
This scheme works by associating a group with a directory and giving users, users that are allowed to make changes, membership in the group.&lt;br /&gt;
In this document such groups are called &amp;quot;media groups&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are in a media group you have read/write access to the group&#039;s media files.&lt;br /&gt;
Otherwise, you have read access -- or no access.&lt;br /&gt;
&lt;br /&gt;
This is a simple approach, and has some limitations.&lt;br /&gt;
&lt;br /&gt;
* Any given file can be in only one directory and is associated with only a single group.  Categorizing a file as modifiable by multiple groups is not possible.&lt;br /&gt;
&lt;br /&gt;
* Files and directories have an owner as well as a group.  Typically the owner has read/write permissions.  When a file or directory&#039;s owner is not a member of the file or directory&#039;s group, looking solely at group membership does not reflect the owner&#039;s permissions.&lt;br /&gt;
&lt;br /&gt;
* The UPG idiom assumes that files remain in the directories in which they were initially put, or a sub-directory.  It works because new files are given the group of the directory in which they are placed.  Moving files between directories that belong to different groups requires that the file&#039;s groups be manually changed to reflect the group of the new containing directory.  At least this is required if directories are assumed to control permission, so that who has access to what can be readily determined by where a file is placed in the directory hierarchy.  This problem is mitigated with the use of a bespoke auditing tool, kcpm-audit.&lt;br /&gt;
&lt;br /&gt;
* Membership in a group gives read/write permissions but says nothing about who can read but not change a file.  To grant or deny read-only permission a different mechanism is used, granting or denying access to &amp;quot;other&amp;quot;, anybody who&#039;s not either the file&#039;s owner or a group member.  So determining who has read-only access is different from, and more complicated than determining who has read-write access.  To obtain any kind of access to a file a user must have at least read permissions on the directory containing the file, and all of the parent directories.&lt;br /&gt;
&lt;br /&gt;
Although standard Unix command line tools are available for use and&lt;br /&gt;
can do the job, to simplify and standardize a number of bespoke command&lt;br /&gt;
line tools are made available to do things like create media user&lt;br /&gt;
accounts, create permission controlled media directories, and other&lt;br /&gt;
management tasks.&lt;br /&gt;
&lt;br /&gt;
The system has some naming conventions which aim to simplify&lt;br /&gt;
management and system use.  These are enforced when using the bespoke&lt;br /&gt;
management command line tools.  The conventions are:&lt;br /&gt;
&lt;br /&gt;
* Directories that introduce permission restrictions have names that end in either &amp;quot;_public&amp;quot; or &amp;quot;_private&amp;quot;.  The ones ending in &amp;quot;_public&amp;quot; contain files that are readable by anyone with a media login.  The ones ending in &amp;quot;_private&amp;quot; are readable only by media logins who are members of the directory&#039;s group.&lt;br /&gt;
&lt;br /&gt;
* The groups that categorize access to media files, in which media users are made members, begin with &amp;quot;m-&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== About alternative permission control mechanisms ===&lt;br /&gt;
&lt;br /&gt;
[https://manpages.debian.org/bookworm/acl/acl.5.en.html ACL]s are a&lt;br /&gt;
permission system that can be used in conjunction with the traditional&lt;br /&gt;
Unix permission system.  ACLs provide fine-grained control over who&lt;br /&gt;
has permission to do exactly what to each file.  But ACL use is&lt;br /&gt;
non-obvious, and ACL permissions are unlikely to be visible in&lt;br /&gt;
off-the-shelf graphical remote access mechanisms which use SFTP.&lt;br /&gt;
So while ACLs are available their use is not recommended.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Groups Built-In to the System ==&lt;br /&gt;
&lt;br /&gt;
The media repository&amp;lt; system is constructed of 2 core groups.&lt;br /&gt;
These are the groups which the operating system is aware of and which provide it control.&lt;br /&gt;
&lt;br /&gt;
;sftp-only&lt;br /&gt;
: Members of this group are &amp;quot;media logins&amp;quot;. A media login is a regular Unix login that is in the &amp;lt;code&amp;gt;sftp-only&amp;lt;/code&amp;gt; group. These logins cannot reach the Unix shell, which processes Unix commands.&lt;br /&gt;
&lt;br /&gt;
;media-admin&lt;br /&gt;
: Members of this group have permission to use the bespoke programs which require elevated system-level privileges, like create new logins or groups.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Working from the Unix command line ==&lt;br /&gt;
&lt;br /&gt;
=== File Locations and Disk Space Management ===&lt;br /&gt;
&lt;br /&gt;
All media files are located in the &amp;lt;code&amp;gt;/srv/media/&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
The amount of available space, and space already used, can be seen&lt;br /&gt;
with:&lt;br /&gt;
&lt;br /&gt;
  [https://www.gnu.org/software/coreutils/manual/html_node/df-invocation.html df] -h /srv/media&lt;br /&gt;
&lt;br /&gt;
=== Using the Unix Command Line ===&lt;br /&gt;
&lt;br /&gt;
All the command line tools take a &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; argument, which&lt;br /&gt;
causes the command to display a brief summary of its functionality and&lt;br /&gt;
arguments.  The bespoke command line tools generally have no other&lt;br /&gt;
documentation.  You will need to execute them with the&lt;br /&gt;
&amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; argument to determine their usage and arguments.&lt;br /&gt;
Documentation to the standard Unix command line tools are linked&lt;br /&gt;
herein.&lt;br /&gt;
&lt;br /&gt;
=== Permission errors ===&lt;br /&gt;
&lt;br /&gt;
Some of the standard Unix commands, like &amp;lt;code&amp;gt;chown&amp;lt;/code&amp;gt;, which&lt;br /&gt;
changes file or directory ownership, requires special permission to&lt;br /&gt;
run.  If a &amp;quot;permission denied&amp;quot; error is received, try running the&lt;br /&gt;
command with the word &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; placed in front.&lt;br /&gt;
&lt;br /&gt;
When specifying a file or directory, &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; will require&lt;br /&gt;
the fully qualified path -- a pathname that starts with&lt;br /&gt;
&amp;lt;code&amp;gt;/srv/media/&amp;lt;/code&amp;gt; and lists all intermediate directories.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== User and group management tools ==&lt;br /&gt;
&lt;br /&gt;
;kcpm-adduser&lt;br /&gt;
: Creates a media user, or adds a media user to a media group.&lt;br /&gt;
  &lt;br /&gt;
;kcpm-deluser&lt;br /&gt;
: Deletes a media user, if the user owns no files. Or removes a media user from a media group.&lt;br /&gt;
&lt;br /&gt;
;kcpm-user-list&lt;br /&gt;
: Lists all members of the sftp-only group, and the groups they are in.&lt;br /&gt;
&lt;br /&gt;
;kcpm-group-list&lt;br /&gt;
: Lists all media groups, and the users they contain.  Media groups are identified by a &amp;quot;m-&amp;quot; prefix.&lt;br /&gt;
&lt;br /&gt;
;kcpm-addgroup&lt;br /&gt;
:Creates a media group.&lt;br /&gt;
&lt;br /&gt;
;kcpm-delgroup&lt;br /&gt;
: Deletes a media group, only if there are no members, and no files in the group.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Directory and file management tools ==&lt;br /&gt;
&lt;br /&gt;
=== CAUTION ===&lt;br /&gt;
&lt;br /&gt;
Do not move files between directories which are in different groups.&lt;br /&gt;
If you do, by a method other than &amp;lt;code&amp;gt;kcpm-mv&amp;lt;/code&amp;gt;, the file&#039;s group will not&lt;br /&gt;
reflect the group of its containing directory.  That means that when&lt;br /&gt;
a file is moved to a publicly readable directory it can still be&lt;br /&gt;
modified by the group members of the origin directory, and is not&lt;br /&gt;
modifiable by the group members of the containing directory.&lt;br /&gt;
&lt;br /&gt;
If you do move a file, the group of the file must be changed to&lt;br /&gt;
match the group of its containing directory.  As an alternative to&lt;br /&gt;
moving (renaming), copy the file and delete the original.  (This&lt;br /&gt;
will involve downloading and re-uploading, unless you&#039;re working&lt;br /&gt;
from the Unix prompt.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;kcpm-audit&amp;lt;/code&amp;gt; can be run to report on such discrepancies, and to change&lt;br /&gt;
group membership of files to reflect that of their containing&lt;br /&gt;
directory.&lt;br /&gt;
&lt;br /&gt;
Directories are rooted at a [https://www.gnu.org/software/coreutils/manual/html_node/Directory-Setuid-and-Setgid.html setgid] directory, group &amp;lt;code&amp;gt;sftp-only&amp;lt;/code&amp;gt;, so all&lt;br /&gt;
sub-directories are setgid.&lt;br /&gt;
&lt;br /&gt;
=== kcpm-mkmdir ===&lt;br /&gt;
&lt;br /&gt;
Given a group and a directory name, makes a directory in the group.&lt;br /&gt;
The group then controls access to content added to the directory.&lt;br /&gt;
&amp;lt;code&amp;gt;--private&amp;lt;/code&amp;gt; makes a directory with a name ending in &amp;quot;_private&amp;quot;.&lt;br /&gt;
&amp;lt;code&amp;gt;--public&amp;lt;/code&amp;gt; makes a  directory with a name ending in &amp;quot;_public&amp;quot;.&lt;br /&gt;
The *_public directory is readable by anyone with a login.  The *_private&lt;br /&gt;
directory is readable only by members of the group.&lt;br /&gt;
&lt;br /&gt;
This is a convenience utility.  The &amp;lt;code&amp;gt;chgrp&amp;lt;/code&amp;gt; command can be used to&lt;br /&gt;
change the group of a directory, and &amp;lt;code&amp;gt;chmod o-x&amp;lt;/code&amp;gt; will make a&lt;br /&gt;
directory private.  The *_public and *_private naming conventions&lt;br /&gt;
are recommended.  They provide clear guidance as to which&lt;br /&gt;
directories control access.&lt;br /&gt;
&lt;br /&gt;
=== kcpm-mv ===&lt;br /&gt;
Move or rename files or directories.&lt;br /&gt;
Takes care of re-assigning groups when moving files.&lt;br /&gt;
&lt;br /&gt;
This is a convenience utility.  The &amp;lt;code&amp;gt;chgrp -R&amp;lt;/code&amp;gt; command can be used&lt;br /&gt;
to (recursively) change group permissions.  Files should be in the&lt;br /&gt;
group of their containing directory, so take care using&lt;br /&gt;
&amp;lt;code&amp;gt;-R&amp;lt;/code&amp;gt; when nested directories are in different groups.&lt;br /&gt;
&lt;br /&gt;
=== kcpm-audit ===&lt;br /&gt;
Given a directory, recursively report on unexpected permissions structures.&lt;br /&gt;
* Directories named *_public that are in the group of the parent&lt;br /&gt;
* Directories named *_public that are private (o-x)&lt;br /&gt;
* Directories named *_private that are not private (o+x)&lt;br /&gt;
* Files that are not in the group of their parent directory&lt;br /&gt;
* Files or directories that are owned by a user who is not a member of the file or directory&#039;s group.&lt;br /&gt;
&lt;br /&gt;
Or, changes permissions to fix all of the above.&lt;br /&gt;
    &lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/chgrp-invocation.html chgrp] (-R) ... ===&lt;br /&gt;
&lt;br /&gt;
Change the group&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/chmod-invocation.html chmod] o-x ... ===&lt;br /&gt;
&lt;br /&gt;
Remove public access from a directory.&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/chmod-invocation.html chmod] o+x ... ===&lt;br /&gt;
&lt;br /&gt;
Add public access to a directory.&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/rm-invocation.html rm] ===&lt;br /&gt;
&lt;br /&gt;
Delete a file or a directory structure.&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/rmdir-invocation.html rmdir] ===&lt;br /&gt;
&lt;br /&gt;
Delete an empty directory.&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/mkdir-invocation.html mkdir] ===&lt;br /&gt;
&lt;br /&gt;
Make non-media-controlled directories&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/findutils/manual/html_mono/find.html find] . -group name ===&lt;br /&gt;
&lt;br /&gt;
Find everything belonging to a group.  Find has many options, and&lt;br /&gt;
can even be used to execute commands on the files found.  It is&lt;br /&gt;
useful for things like bulk changing of file ownership.&lt;br /&gt;
&lt;br /&gt;
=== [https://www.gnu.org/software/coreutils/manual/html_node/ls-invocation.html ls] -lhR ===&lt;br /&gt;
&lt;br /&gt;
Show everything in the file system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Techniques ==&lt;br /&gt;
&lt;br /&gt;
Anything put in the top-level directory are read/writable to anyone&lt;br /&gt;
with a login.&lt;br /&gt;
&lt;br /&gt;
=== Make a test login to test access ===&lt;br /&gt;
&lt;br /&gt;
A test login can be created, and put into any set of groups.&lt;br /&gt;
This allows for testing of access, and emulating what a user who&#039;s in&lt;br /&gt;
the same set of groups is allowed to do.&lt;br /&gt;
&lt;br /&gt;
=== Layer directories to control access ===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Regular&amp;quot; directories can be used at any level to structure content.&lt;br /&gt;
&lt;br /&gt;
If you have topdir_private/subdir, in respective groups topdir and&lt;br /&gt;
subdir, consider the content of subdir.  Only topdir members have&lt;br /&gt;
access.  Members of subdir have read/write access, and topdir members&lt;br /&gt;
have read-only access.&lt;/div&gt;</summary>
		<author><name>KarlPinc</name></author>
	</entry>
	<entry>
		<id>https://kibale.unm.edu/w/index.php?title=Media_Repository_Administration&amp;diff=12</id>
		<title>Media Repository Administration</title>
		<link rel="alternate" type="text/html" href="https://kibale.unm.edu/w/index.php?title=Media_Repository_Administration&amp;diff=12"/>
		<updated>2025-02-06T23:57:27Z</updated>

		<summary type="html">&lt;p&gt;KarlPinc: Initial page; wiki markup is incomplete&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The KCP media repository controls access using the standard Unix&lt;br /&gt;
[https://www.gnu.org/software/coreutils/manual/html_node/Changing-file-attributes.html  ownership] and&lt;br /&gt;
[https://www.gnu.org/software/coreutils/manual/html_node/File-permissions.html permission] system.&lt;br /&gt;
Specifically, it uses the [https://flylib.com/books/en/4.150.1.60/1/ User-Private-Group] (UPG) idiom.&lt;br /&gt;
This scheme works by associating a group with a directory and giving users, users that are allowed to make changes, membership in the group.&lt;br /&gt;
In this document such groups are called &amp;quot;media groups&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are in a media group you have read/write access to the group&#039;s media files.&lt;br /&gt;
Otherwise, you have read access -- or no access.&lt;br /&gt;
&lt;br /&gt;
This is a simple approach, and has some limitations.&lt;br /&gt;
&lt;br /&gt;
* Any given file can be in only one directory and is associated with only a single group.  Categorizing a file as modifiable by multiple groups is not possible.&lt;br /&gt;
&lt;br /&gt;
* Files and directories have an owner as well as a group.  Typically the owner has read/write permissions.  When a file or directory&#039;s owner is not a member of the file or directory&#039;s group, looking solely at group membership does not reflect the owner&#039;s permissions.&lt;br /&gt;
&lt;br /&gt;
* The UPG idiom assumes that files remain in the directories in which they were initially put, or a sub-directory.  It works because new files are given the group of the directory in which they are placed.  Moving files between directories that belong to different groups requires that the file&#039;s groups be manually changed to reflect the group of the new containing directory.  At least this is required if directories are assumed to control permission, so that who has access to what can be readily determined by where a file is placed in the directory hierarchy.  This problem is mitigated with the use of a bespoke auditing tool, kcpm-audit.&lt;br /&gt;
&lt;br /&gt;
* Membership in a group gives read/write permissions but says nothing about who can read but not change a file.  To grant or deny read-only permission a different mechanism is used, granting or denying access to &amp;quot;other&amp;quot;, anybody who&#039;s not either the file&#039;s owner or a group member.  So determining who has read-only access is different from, and more complicated than determining who has read-write access.  To obtain any kind of access to a file a user must have at least read permissions on the directory containing the file, and all of the parent directories.&lt;br /&gt;
&lt;br /&gt;
Although standard Unix command line tools are available for use and&lt;br /&gt;
can do the job, to simplify and standardize a number of bespoke command&lt;br /&gt;
line tools are made available to do things like create media user&lt;br /&gt;
accounts, create permission controlled media directories, and other&lt;br /&gt;
management tasks.&lt;br /&gt;
&lt;br /&gt;
The system has some naming conventions which aim to simplify&lt;br /&gt;
management and system use.  These are enforced when using the bespoke&lt;br /&gt;
management command line tools.  The conventions are:&lt;br /&gt;
&lt;br /&gt;
* Directories that introduce permission restrictions have names that end in either &amp;quot;_public&amp;quot; or &amp;quot;_private&amp;quot;.  The ones ending in &amp;quot;_public&amp;quot; contain files that are readable by anyone with a media login.  The ones ending in &amp;quot;_private&amp;quot; are readable only by media logins who are members of the directory&#039;s group.&lt;br /&gt;
&lt;br /&gt;
* The groups that categorize access to media files, in which media users are made members, begin with &amp;quot;m-&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== About alternative permission control mechanisms ===&lt;br /&gt;
&lt;br /&gt;
[https://manpages.debian.org/bookworm/acl/acl.5.en.html ACL]s are a&lt;br /&gt;
permission system that can be used in conjunction with the traditional&lt;br /&gt;
Unix permission system.  ACLs provide fine-grained control over who&lt;br /&gt;
has permission to do exactly what to each file.  But ACL use is&lt;br /&gt;
non-obvious, and ACL permissions are unlikely to be visible in&lt;br /&gt;
off-the-shelf graphical remote access mechanisms which use SFTP.&lt;br /&gt;
So while ACLs are available their use is not recommended.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Groups Built-In to the System ==&lt;br /&gt;
&lt;br /&gt;
The media repository&amp;lt; system is constructed of 2 core groups.&lt;br /&gt;
These are the groups which the operating system is aware of and which provide it control.&lt;br /&gt;
&lt;br /&gt;
;sftp-only&lt;br /&gt;
: Members of this group are &amp;quot;media logins&amp;quot;. A media login is a regular Unix login that is in the &amp;lt;code&amp;gt;sftp-only&amp;lt;/code&amp;gt; group. These logins cannot reach the Unix shell, which processes Unix commands.&lt;br /&gt;
&lt;br /&gt;
;media-admin&lt;br /&gt;
: Members of this group have permission to use the bespoke programs which require elevated system-level privileges, like create new logins or groups.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Working from the Unix command line ==&lt;br /&gt;
&lt;br /&gt;
=== File Locations and Disk Space Management ===&lt;br /&gt;
&lt;br /&gt;
All media files are located in the &amp;lt;code&amp;gt;/srv/media/&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
The amount of available space, and space already used, can be seen&lt;br /&gt;
with:&lt;br /&gt;
&lt;br /&gt;
  [https://www.gnu.org/software/coreutils/manual/html_node/df-invocation.html df] -h /srv/media&lt;br /&gt;
&lt;br /&gt;
=== Using the Unix Command Line ===&lt;br /&gt;
&lt;br /&gt;
All the command line tools take a &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; argument, which&lt;br /&gt;
causes the command to display a brief summary of its functionality and&lt;br /&gt;
arguments.  The bespoke command line tools generally have no other&lt;br /&gt;
documentation.  You will need to execute them with the&lt;br /&gt;
&amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; argument to determine their usage and arguments.&lt;br /&gt;
Documentation to the standard Unix command line tools are linked&lt;br /&gt;
herein.&lt;br /&gt;
&lt;br /&gt;
=== Permission errors ===&lt;br /&gt;
&lt;br /&gt;
Some of the standard Unix commands, like &amp;lt;code&amp;gt;chown&amp;lt;/code&amp;gt;, which&lt;br /&gt;
changes file or directory ownership, requires special permission to&lt;br /&gt;
run.  If a &amp;quot;permission denied&amp;quot; error is received, try running the&lt;br /&gt;
command with the word &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; placed in front.&lt;br /&gt;
&lt;br /&gt;
When specifying a file or directory, &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; will require&lt;br /&gt;
the fully qualified path -- a pathname that starts with&lt;br /&gt;
&amp;lt;code&amp;gt;/srv/media/&amp;lt;/code&amp;gt; and lists all intermediate directories.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== User and group management tools ==&lt;br /&gt;
&lt;br /&gt;
;kcpm-adduser&lt;br /&gt;
: Creates a media user, or adds a media user to a media group.&lt;br /&gt;
  &lt;br /&gt;
;kcpm-deluser&lt;br /&gt;
: Deletes a media user, if the user owns no files. Or removes a media user from a media group.&lt;br /&gt;
&lt;br /&gt;
;kcpm-user-list&lt;br /&gt;
: Lists all members of the sftp-only group, and the groups they are in.&lt;br /&gt;
&lt;br /&gt;
;kcpm-group-list&lt;br /&gt;
: Lists all media groups, and the users they contain.  Media groups are identified by a &amp;quot;m-&amp;quot; prefix.&lt;br /&gt;
&lt;br /&gt;
;kcpm-addgroup&lt;br /&gt;
:Creates a media group.&lt;br /&gt;
&lt;br /&gt;
;kcpm-delgroup&lt;br /&gt;
: Deletes a media group, only if there are no members, and no files in the group.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Directory and file management tools ==&lt;br /&gt;
&lt;br /&gt;
CAUTION:&lt;br /&gt;
  Do not move files between directories which are in different groups.&lt;br /&gt;
  If you do, by a method other than kcpm-mv, the file&#039;s group will not&lt;br /&gt;
  reflect the group of its containing directory.  That means that when&lt;br /&gt;
  a file is moved to a publicly readable directory it can still be&lt;br /&gt;
  modified by the group members of the origin directory, and is not&lt;br /&gt;
  modifiable by the group members of the containing directory.&lt;br /&gt;
&lt;br /&gt;
  If you do move a file, the group of the file must be changed to&lt;br /&gt;
  match the group of its containing directory.  As an alternative to&lt;br /&gt;
  moving (renaming), copy the file and delete the original.  (This&lt;br /&gt;
  will involve downloading and re-uploading, unless you&#039;re working&lt;br /&gt;
  from the Unix prompt.)&lt;br /&gt;
&lt;br /&gt;
  kcpm-audit can be run to report on such discrepancies, and to change&lt;br /&gt;
  group membership of files to reflect that of their containing&lt;br /&gt;
  directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Directories are rooted at a setgid directory, group sftp-only, so all&lt;br /&gt;
sub-directories are setgid.&lt;br /&gt;
&lt;br /&gt;
kcpm-mkmdir&lt;br /&gt;
  Given a group and a directory name, makes a directory in the group.&lt;br /&gt;
  --private makes a *_private directory&lt;br /&gt;
  --public makes a *_public directory.&lt;br /&gt;
  The named directory is readable by anyone with a login.  The *_private&lt;br /&gt;
  directory is readable only by members of the group.&lt;br /&gt;
&lt;br /&gt;
  This is a convenience utility.  The `chgrp` command can be used to&lt;br /&gt;
  change the group of a directory, and `chmod o-x` will make a&lt;br /&gt;
  directory private.  The *_public and *_private naming conventions&lt;br /&gt;
  are recommended.  They provide clear guidance as to which&lt;br /&gt;
  directories control access.&lt;br /&gt;
&lt;br /&gt;
kcpm-mv&lt;br /&gt;
  Move or rename files or directories&lt;br /&gt;
  Takes care of re-assigning groups when moving files.&lt;br /&gt;
&lt;br /&gt;
  This is a convenience utility.  The `chgrp -R` command can be used&lt;br /&gt;
  to (recursively) change group permissions.  Files should be in the&lt;br /&gt;
  group of their containing directory, so take care using&lt;br /&gt;
  &amp;lt;code&amp;gt;-R&amp;lt;/code&amp;gt; when nested directories are in different groups.&lt;br /&gt;
&lt;br /&gt;
kcpm-audit&lt;br /&gt;
  Given a directory, recursively:&lt;br /&gt;
  Reports on unexpected permissions structures&lt;br /&gt;
    Directories named *_public that are in the group of the parent&lt;br /&gt;
    Directories named *_public that are private (o-x)&lt;br /&gt;
    Directories named *_private that are not private (o+x)&lt;br /&gt;
    Files that are not in the group of their parent directory&lt;br /&gt;
    Files or directories that are owned by a user who is not a member&lt;br /&gt;
      of the file or directory&#039;s group.&lt;br /&gt;
  Or, changes permissions to fix all of the above.&lt;br /&gt;
    &lt;br /&gt;
[https://www.gnu.org/software/coreutils/manual/html_node/chgrp-invocation.html chgrp] (-R) ...&lt;br /&gt;
  Change the group&lt;br /&gt;
&lt;br /&gt;
[https://www.gnu.org/software/coreutils/manual/html_node/chmod-invocation.html chmod] o-x ...&lt;br /&gt;
[https://www.gnu.org/software/coreutils/manual/html_node/chmod-invocation.html chmod] o+x ...&lt;br /&gt;
  Change public access to a directory.&lt;br /&gt;
&lt;br /&gt;
[https://www.gnu.org/software/coreutils/manual/html_node/rm-invocation.html rm]&lt;br /&gt;
  Delete a file or a directory structure.&lt;br /&gt;
[https://www.gnu.org/software/coreutils/manual/html_node/rmdir-invocation.html rmdir]&lt;br /&gt;
  Delete an empty directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://www.gnu.org/software/coreutils/manual/html_node/mkdir-invocation.html mkdir]&lt;br /&gt;
  Make non-media-controlled directories&lt;br /&gt;
&lt;br /&gt;
[https://www.gnu.org/software/findutils/manual/html_mono/find.html find] . -group name&lt;br /&gt;
  Find everything belonging to a group.  Find has many options, and&lt;br /&gt;
  can even be used to execute commands on the files found.  It is&lt;br /&gt;
  useful for things like bulk changing of file ownership.&lt;br /&gt;
&lt;br /&gt;
[https://www.gnu.org/software/coreutils/manual/html_node/ls-invocation.html ls] -lhR&lt;br /&gt;
  Show everything in the file system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Techniques:&lt;br /&gt;
&lt;br /&gt;
Anything put in the top-level directory are read/writable to anyone&lt;br /&gt;
with a login.&lt;br /&gt;
&lt;br /&gt;
Make a test login to test access:&lt;br /&gt;
&lt;br /&gt;
A test login can be created, and put into any set of groups.&lt;br /&gt;
This allows for testing of access, and emulating what a user who&#039;s in&lt;br /&gt;
the same set of groups is allowed to do.&lt;br /&gt;
&lt;br /&gt;
Layer directories to control access:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Regular&amp;quot; directories can be used at any level to structure content.&lt;br /&gt;
&lt;br /&gt;
If you have topdir_private/subdir, in respective groups topdir and&lt;br /&gt;
subdir, consider the content of subdir.  Only topdir members have&lt;br /&gt;
access.  Members of subdir have read/write access, and topdir members&lt;br /&gt;
have read-only access.&lt;/div&gt;</summary>
		<author><name>KarlPinc</name></author>
	</entry>
	<entry>
		<id>https://kibale.unm.edu/w/index.php?title=Administration&amp;diff=11</id>
		<title>Administration</title>
		<link rel="alternate" type="text/html" href="https://kibale.unm.edu/w/index.php?title=Administration&amp;diff=11"/>
		<updated>2025-02-06T23:25:08Z</updated>

		<summary type="html">&lt;p&gt;KarlPinc: /* Administration Menu */ Add link to media repository administration&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You want this page if you&#039;re adding or deleting user accounts, of whatever sort, or want information on other administrative or maintenance tasks.&lt;br /&gt;
&lt;br /&gt;
== Creating Accounts for a New User ==&lt;br /&gt;
&lt;br /&gt;
When a person joins the project it is best to [[Wiki Administration#Creating_Wiki_Users|create a wiki account]] and a database account for them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The expectation is that most users will interact with the database using a web browser.&lt;br /&gt;
Users who wish to connect directly to the database also need a [[VPN|VPN login]].&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Administration Menu ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- * [[PgAdmin4 Administration]] --&amp;gt;&lt;br /&gt;
* [[Wiki Administration|Wiki User Administration]]&lt;br /&gt;
* [[Media Repository Administration]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Wiki Maintenance]]&lt;br /&gt;
* [[Unix Administration|Unix/Linux Administration]]&lt;br /&gt;
** [[VPN User Management]]&lt;br /&gt;
* [[PGWUI Administration|Bespoke Program (PGWUI) Administration]]&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>KarlPinc</name></author>
	</entry>
	<entry>
		<id>https://kibale.unm.edu/w/index.php?title=Media_Archive&amp;diff=10</id>
		<title>Media Archive</title>
		<link rel="alternate" type="text/html" href="https://kibale.unm.edu/w/index.php?title=Media_Archive&amp;diff=10"/>
		<updated>2025-02-06T20:37:07Z</updated>

		<summary type="html">&lt;p&gt;KarlPinc: Initial page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Media files are accessed by way of a [https://www.google.com/search?q=sftp+client SFTP client], like [https://filezilla-project.org/ FileZilla].&lt;br /&gt;
You must have a &amp;quot;media login&amp;quot; to kibale.unm.edu, given to you by one of the project&#039;s administrators.&lt;br /&gt;
&lt;br /&gt;
A media login consists of a username and password.&lt;br /&gt;
They are handed out one-per-person, do not share yours.&lt;br /&gt;
&lt;br /&gt;
Access media files with the URL: sftp://kibale.unm.edu&amp;lt;br&amp;gt;&lt;br /&gt;
(Note that this URL will not work from most web browsers.)&lt;br /&gt;
&lt;br /&gt;
Alternately, tell your SFTP client to connect to &amp;lt;code&amp;gt;kibale.unm.edu&amp;lt;/code&amp;gt; using&lt;br /&gt;
your username and password.&lt;/div&gt;</summary>
		<author><name>KarlPinc</name></author>
	</entry>
	<entry>
		<id>https://kibale.unm.edu/w/index.php?title=Main_Page&amp;diff=9</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://kibale.unm.edu/w/index.php?title=Main_Page&amp;diff=9"/>
		<updated>2025-02-06T20:08:02Z</updated>

		<summary type="html">&lt;p&gt;KarlPinc: /* The KCPDB -- The Kibale Chimpanzee Project DataBase */ Add link to media archive page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The KCPDB -- The Kibale Chimpanzee Project DataBase ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- * [https://kibale.unm.edu/adminer/ Access the database with Adminer] --&amp;gt;&lt;br /&gt;
* Documentation&lt;br /&gt;
** [[Media Archive|The Media Archive]]&lt;br /&gt;
* [[Administration|Administrative Tasks]]&lt;/div&gt;</summary>
		<author><name>KarlPinc</name></author>
	</entry>
	<entry>
		<id>https://kibale.unm.edu/w/index.php?title=Main_Page&amp;diff=8</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://kibale.unm.edu/w/index.php?title=Main_Page&amp;diff=8"/>
		<updated>2025-02-05T20:13:26Z</updated>

		<summary type="html">&lt;p&gt;KarlPinc: Add a commneted out adminer link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The KCPDB -- The Kibale Chimpanzee Project DataBase ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- * [https://kibale.unm.edu/adminer/ Access the database with Adminer] --&amp;gt;&lt;br /&gt;
* [[Administration|Administrative Tasks]]&lt;/div&gt;</summary>
		<author><name>KarlPinc</name></author>
	</entry>
	<entry>
		<id>https://kibale.unm.edu/w/index.php?title=MediaWiki:Sidebar&amp;diff=7</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://kibale.unm.edu/w/index.php?title=MediaWiki:Sidebar&amp;diff=7"/>
		<updated>2025-02-02T19:36:00Z</updated>

		<summary type="html">&lt;p&gt;KarlPinc: Move search to top of sidebar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
* SEARCH&lt;br /&gt;
* navigation&lt;br /&gt;
** mainpage|mainpage-description&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** helppage|help-mediawiki&lt;br /&gt;
* Special Pages&lt;br /&gt;
** Special:CreateAccount|Create User&lt;br /&gt;
* TOOLBOX&lt;br /&gt;
* LANGUAGES&lt;/div&gt;</summary>
		<author><name>KarlPinc</name></author>
	</entry>
	<entry>
		<id>https://kibale.unm.edu/w/index.php?title=MediaWiki:Sidebar&amp;diff=6</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://kibale.unm.edu/w/index.php?title=MediaWiki:Sidebar&amp;diff=6"/>
		<updated>2025-02-02T19:35:06Z</updated>

		<summary type="html">&lt;p&gt;KarlPinc: Add Create User link to sidebar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
* navigation&lt;br /&gt;
** mainpage|mainpage-description&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** helppage|help-mediawiki&lt;br /&gt;
* SEARCH&lt;br /&gt;
* Special Pages&lt;br /&gt;
** Special:CreateAccount|Create User&lt;br /&gt;
* TOOLBOX&lt;br /&gt;
* LANGUAGES&lt;/div&gt;</summary>
		<author><name>KarlPinc</name></author>
	</entry>
	<entry>
		<id>https://kibale.unm.edu/w/index.php?title=Wiki_Administration&amp;diff=5</id>
		<title>Wiki Administration</title>
		<link rel="alternate" type="text/html" href="https://kibale.unm.edu/w/index.php?title=Wiki_Administration&amp;diff=5"/>
		<updated>2025-02-02T19:24:18Z</updated>

		<summary type="html">&lt;p&gt;KarlPinc: Initial page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The intent is to allow everyone associated with the KCPDB project to contribute to and improve the wiki.&lt;br /&gt;
But the wiki is configured so that the public at large (&amp;quot;anonymous&amp;quot; wiki users) cannot create or edit the wiki&#039;s pages.&lt;br /&gt;
So when a new person becomes involved in KCPDB someone must give them a login, a user account, on the wiki.&lt;br /&gt;
This section documents how the wiki permission system works.&lt;br /&gt;
It also describes the process that needs to take place to ensure that everyone involved with&lt;br /&gt;
KCPDB can contribute to the wiki.&lt;br /&gt;
&lt;br /&gt;
For more information see the [https://en.wikibooks.org/wiki/MediaWiki_Administrator%27s_Handbook book] on wiki administration, with links to related books on wiki usage, etc., or the [https://www.mediawiki.org/wiki/Manual MediaWiki Manual].&lt;br /&gt;
&lt;br /&gt;
[Skip to [[Administration#Creating Wiki Users|Creating Wiki Users]]]&lt;br /&gt;
&lt;br /&gt;
== Concepts ==&lt;br /&gt;
The wiki&#039;s [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:User_rights_and_groups permission system] contains [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:User_rights#List_of_groups various groups].&lt;br /&gt;
Users (aka &amp;quot;user accounts&amp;quot;) may be put into one or more of these groups.&lt;br /&gt;
Each group has a set of associated [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:User_rights#List_of_permissions permissions], the details of which are not always interesting.&lt;br /&gt;
&lt;br /&gt;
What&#039;s important is to give people their own, individual, user accounts because accounts and passwords should not be shared.  &lt;br /&gt;
Also important is to put wiki users into appropriate groups to facilitate the use and administration of the wiki.&lt;br /&gt;
&lt;br /&gt;
Ordinary uses need not be added to any groups, just create them.&lt;br /&gt;
&lt;br /&gt;
The wiki has been customized so that every user is allowed to create other users, the idea being to make it easy to give everyone associated with KCPDB a wiki login.&lt;br /&gt;
&lt;br /&gt;
Some users are to be given special permissions to help administer the wiki, &amp;quot;bureaucrat&amp;quot; rights.  &lt;br /&gt;
Bureaucrats are allowed to put users into and take users out of groups, and thereby to change the rights of other users; notably, to create new bureaucrats by putting otherwise ordinary wiki users into the &#039;&#039;bureaucrat&#039;&#039; group.  &lt;br /&gt;
Ordinarily, this is a useless feature.  &lt;br /&gt;
But at some point it may be desirable to make various advanced adjustments to the operation of the wiki as a whole, and therefore necessary to grant some uses special permissions.  &lt;br /&gt;
Without bureaucrat permission a Unix login would be required for this.&lt;br /&gt;
It is likely to be much more convenient to manipulate the wiki&#039;s interface via a web browser than to work at the Unix command line level.&lt;br /&gt;
&lt;br /&gt;
There should always be 2 people (wiki users) that are bureaucrats.&lt;br /&gt;
That way when a bureaucrat leaves the project there remains a person who can create new bureaucrats. The list of bureaucrats can be found at [Special:ListUsers/bureaucrat]. &lt;br /&gt;
&lt;br /&gt;
There are 2 groups that are of interest when creating users that are bureaucrats.&lt;br /&gt;
&lt;br /&gt;
=== Wiki Groups ===&lt;br /&gt;
&lt;br /&gt;
; [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Sysops_and_permissions sysop] : (Also known as &amp;quot;[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Administrators administrator]&amp;quot;.)  Users in this group can create new users, delete and undelete pages together with all the page edit history, block and unblock users, etc.  Should the customization that gives ordinary users the right to create new users ever be removed, it is important that all bureaucrats belong to &#039;&#039;sysop&#039;&#039; so that they can create new users.&lt;br /&gt;
&lt;br /&gt;
; bureaucrat : Members of this group can assign/unassign users to/from groups, thereby changing the users&#039; permissions.&lt;br /&gt;
&lt;br /&gt;
== Maintaining Wiki Users ==&lt;br /&gt;
&lt;br /&gt;
After logging on to the wiki, any user can create another user by going to the user creation page: [[Special:CreateAccount]]&lt;br /&gt;
The wiki has been customized (edited in the wiki actually) to add a &amp;quot;Create User&amp;quot; link to the sidebar appearing on every page.&lt;br /&gt;
&amp;lt;!-- We could use the ConfirmAccount extension to ensure that every user has an email address.  But ConfirmAccount is not included in the standard mediawiki distribution, so lets go without for now. --&amp;gt;&lt;br /&gt;
It is highly recommended that every account have an email address entry.&lt;br /&gt;
&lt;br /&gt;
Bureaucrats can use the [[Special:UserRights]] page to put uses into the &#039;&#039;sysop&#039;&#039; and &#039;&#039;bureaucrat&#039;&#039; groups to make a user a bureaucrat that also has the special powers of a wiki administrator.&lt;br /&gt;
&lt;br /&gt;
* [[Special:CreateAccount|Create a wiki login]]&lt;br /&gt;
* [[Special:UserRights|Change a wiki login&#039;s authority]]&lt;br /&gt;
* [[Special:ListUsers|List the wiki logins]]&lt;br /&gt;
* [[Special:ResetPassword|Password reset]]&lt;br /&gt;
* [[Special:Block|Disable a wiki login]]&lt;br /&gt;
&lt;br /&gt;
Other actions are available via the [[Special:SpecialPages|Special Pages]].&lt;/div&gt;</summary>
		<author><name>KarlPinc</name></author>
	</entry>
	<entry>
		<id>https://kibale.unm.edu/w/index.php?title=Administration&amp;diff=4</id>
		<title>Administration</title>
		<link rel="alternate" type="text/html" href="https://kibale.unm.edu/w/index.php?title=Administration&amp;diff=4"/>
		<updated>2025-02-02T19:19:18Z</updated>

		<summary type="html">&lt;p&gt;KarlPinc: Initial page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You want this page if you&#039;re adding or deleting user accounts, of whatever sort, or want information on other administrative or maintenance tasks.&lt;br /&gt;
&lt;br /&gt;
== Creating Accounts for a New User ==&lt;br /&gt;
&lt;br /&gt;
When a person joins the project it is best to [[Wiki Administration#Creating_Wiki_Users|create a wiki account]] and a database account for them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The expectation is that most users will interact with the database using a web browser.&lt;br /&gt;
Users who wish to connect directly to the database also need a [[VPN|VPN login]].&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Administration Menu ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- * [[PgAdmin4 Administration]] --&amp;gt;&lt;br /&gt;
* [[Wiki Administration|Wiki User Administration]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Wiki Maintenance]]&lt;br /&gt;
* [[Unix Administration|Unix/Linux Administration]]&lt;br /&gt;
** [[VPN User Management]]&lt;br /&gt;
* [[PGWUI Administration|Bespoke Program (PGWUI) Administration]]&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>KarlPinc</name></author>
	</entry>
	<entry>
		<id>https://kibale.unm.edu/w/index.php?title=Main_Page&amp;diff=3</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://kibale.unm.edu/w/index.php?title=Main_Page&amp;diff=3"/>
		<updated>2025-02-02T19:13:16Z</updated>

		<summary type="html">&lt;p&gt;KarlPinc: /* KCPDB  Kibale Chimpanzee Project DataBase */ Better formatting, better page name for administration&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The KCPDB -- The Kibale Chimpanzee Project DataBase ==&lt;br /&gt;
&lt;br /&gt;
* [[Administration|Administrative Tasks]]&lt;/div&gt;</summary>
		<author><name>KarlPinc</name></author>
	</entry>
	<entry>
		<id>https://kibale.unm.edu/w/index.php?title=Main_Page&amp;diff=2</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://kibale.unm.edu/w/index.php?title=Main_Page&amp;diff=2"/>
		<updated>2025-02-02T19:09:02Z</updated>

		<summary type="html">&lt;p&gt;KarlPinc: Initial page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== KCPDB  Kibale Chimpanzee Project DataBase ==&lt;br /&gt;
&lt;br /&gt;
 * [[Administrative Tasks]]&lt;/div&gt;</summary>
		<author><name>KarlPinc</name></author>
	</entry>
</feed>