Forum archive 2000-2006

Lars Jensen - Setting permissions?

Lars Jensen - Setting permissions?

by Arnold Pizer -
Number of replies: 0
inactiveTopicSetting permissions? topic started 1/16/2002; 3:35:08 PM
last post 1/16/2002; 4:08:17 PM
userLars Jensen - Setting permissions?  blueArrow
1/16/2002; 3:35:08 PM (reads: 728, responses: 1)
How do I set correct permissions on set definition files without running the course setup script. My situatuion is that I have created a course first, without any sets in it. Now I want to copy sets into my course from my ..webwork/templates directory. After this I want to ensure the copies set files in my course directory have the right owner/group/permissions. What is the easy way to do this? Is there a script?

Thanks, Lars.

<| Post or View Comments |>


userArnold K. Pizer - Re: Setting permissions?  blueArrow
1/16/2002; 4:08:17 PM (reads: 971, responses: 0)
Hi Lars,

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.

Arnie

<| Post or View Comments |>