Frequently Asked Questions: Managing Shared Accounts
Some files in our society space are owned by an ex-admin and can't be modified... help!
We often get asked it we can resolve this by changing the files' owner to be one of the current admins. For various reasons we prefer not to do this, but are happy to enable modification by changing the "group writable" flag on the files. Just ask the sysadmins and we'll get it done.
If you want to make your files group-writable yourself, the appropriate command is chmod g+rw <filenames>. A variant like chmod -R g+rw *, executed from the base of the society home directory, will recursively make all your files group-readable and writable. If the files' group is not the same as the society, chgrp <groupname> <filenames> will do the trick.
How do I hand access to my shared account to my successor?
Make sure that the new person has a personal account on the machine. Once this has been set up, one of the people who currently has access to the account should email sysadmins@srcf.net with the details of the user to be added and we'll get it sorted out for you.
If you cannot contact anyone who currently has access, please ask the most senior officer in the organisation responsible for the account to email the sysadmins.
During the handover period you should make sure that all file
permissions are updated appropriately. Don't leave any files which are
owned by the outgoing administrator and not group-writable; you should
use e.g. chgrp -R <groupname> * to set your files' group
appropriately and e.g. chmod -R g+u to give other members of
the society admin group the same permissiosn that you have.
The following works particularly well:
chgrp -R --quiet <groupname> /societies/<groupname>/ # Ensure that the group is set correctly. chmod -R --quiet g+u /societies/<groupname>/ # Ensure that any permissions you have, the group has. find /societies/<groupname>/ -type d -print0 | xargs -0 chmod --quiet g+s # Ensure that all directories are setgid so that files in them will be # created with the right group.
How do I set up a society crontab?
This is a little bit messy as you have to use a cgi script to run the crontab command. Make a new directory in your society public_html space and place in there the crontab that you want, in a file called crontab and the following script:
#!/usr/bin/perl
print "Content-type:text/plain\n\n";
system("/usr/bin/crontab", "./crontab");
print "Done!\n";
print "This script is running as the user ";
system("/usr/bin/whoami");
print " and that user's crontab is now\n";
system("/usr/bin/crontab", "-l");
Give the script the appropriate permissions (775 / ug+rwx,o+rx), then navigate to the right place with your web browser and run it. It should give you confirmation of the new crontab. You can then delete the script and the crontab file.
How do I make WordPress update itself?
WordPress includes an update utility, but this can be quite tedious about not correctly detecting that it can update itself; it may fail without even trying, especially on society accounts.
To make this work you can add the following few lines to your configuration (wp-config.php):
/**
* Force wordpress to use direct filesystem access so that upgrades work
* properly. See: http://core.trac.wordpress.org/ticket/10205
* http://codex.wordpress.org/Editing_wp-config.php
*/
define('FS_METHOD', 'direct');
define('FS_CHMOD_DIR', (2775 & ~ umask()));
define('FS_CHMOD_FILE', (0664 & ~ umask()));
This workaround is experimental; please let us know whether it works for you.