|Setting permissions?||topic started 1/16/2002; 3:35:08 PM
last post 1/16/2002; 4:08:17 PM
|Arnold K. Pizer - Re: Setting permissions?
1/16/2002; 4:08:17 PM (reads: 971, responses: 0)
The main thing to keep in mind is that the webserver has to have permission to read the files. In addition if you want professors to be able to edit the files over the web by clicking on "show editor" (which is very convenient for fixing typos's, etc.), the webserver has to have permission to write to files and directories. WeBWorK makes a backup file before saving an edited file, which is the reason the webserver has to have permission to write to directories. The above applies to both set definition files and problem template (.pg) files.
Assuming the webserver is in the group, you should do a chmod -R 770 templates which is usually what you want (or possibly 775 if you want everybody who has an account on the server to be able to read and copy but not edit the files). If you are a purist, use 664 for files and 775 for directories.
If the webserver is in the group, it does not matter who has ownership of the files. In addition to the webserver, if you want a user to be able to edit the files from a terminal session on the server, add them to the group.
It's also a good idea to set the group sticky bit for the templates directory via "chmod g+s templates". This insures that the group ownership of any file you create or modify in the directory is the same as the group ownership of the directory.
You can do a search for "chmod" pr "permission" to find other discussion items about this.