| | 1 | = How do I setup an suExec directory for a member? = |
| | 2 | |
| | 3 | Only MFPL admins have permission to take this step. If you would like suExec enabled for your site, please follow our [wiki:suexec suExec FAQ]. |
| | 4 | |
| | 5 | Run the following script, replacing $USER with the username provided by the member. |
| | 6 | |
| | 7 | {{{ |
| | 8 | # Ensure suexec is enabled (reload apache if necessary) |
| | 9 | user=$USER |
| | 10 | a2enmod suexec |
| | 11 | |
| | 12 | base=/var/www/members-cgi-bin |
| | 13 | |
| | 14 | if [ ! -d "$base" ]; then mkdir "$base"; fi |
| | 15 | |
| | 16 | sitepath=$(getent passwd | grep ^bigbangparty | cut -d: -f6 | cut -d/ -f1,2,3,4,5,6) |
| | 17 | site=$(echo "$sitepath" | cut -d/ -f6) |
| | 18 | |
| | 19 | if [ ! -d "$base/$site" ]; then |
| | 20 | mkdir "$base/$site"; fi |
| | 21 | chown "$user" "$base/$site" |
| | 22 | fi |
| | 23 | |
| | 24 | if [ ! -h "$sitepath/cgi-bin/suexec" ]; then |
| | 25 | ln -s "$base/$site" "$sitepath/cgi-bin/suexec" |
| | 26 | fi |
| | 27 | |
| | 28 | }}} |
| | 29 | |