Description

The migration scripts use the default file permissions of the system for all files generated. This is normally not what one wants. They should copy the old file permissions or use the file permissions used by the new wiki (from config.py).

Steps to reproduce

Migrate any 1.2.x wiki on any typical Linux system.

Workaround

Change the file permissions manually after migration (e.g. chmod -R 0770 data on Linux).

Discussion

Setting everything to the value from config.py in the last migration script should be sufficient. Maybe adding some information to README.migration instead of changing the migration script would also work.

(By the way, am I the only one who thinks that 0770 is a dangerous default? 0700 or at least 0750 would seem better to me. If 0770 is kept, I'd strongly recommend making this option configurable in the wiki config, not just in config.py.)

-- MalteHelmert 2005-02-11 20:27:15

Since the file structure is very different between 1.2 and 1.3, e.g some files are removed, other are new, its not clear how permission should be copied. Also, ownership of all files is changes, as the migration scripts are run by the user, not by the web server.

It should be documented (if its not) that after migration, you must set permission again, just as you do in a new install, don't count on the migration scripts to do this for you.

Why 770 is not safe enough? -- NirSoffer 2005-02-11 20:34:28

Documenting the need to change file permissions manually is certainly good enough then.

The problem with 770 is that on usual Linux systems, the group does not have write access, but it does in MoinMoin. For example, I run a personal wiki at work. The wiki is run from my public_html directory using mod_suexec, the wiki data is stored in my home directory. With the default setting, all my colleagues can read and write all wiki data. They can even run arbitrary code on my account by adding a macro to the wiki plugin directory and editing a page to call that macro.

This would be no problem if the user knows he must configure this, but on most Linux systems I know, the default permissions are 0755 or 0750, so they might not expect the group to have writing rights. I think 0750 would be a good compromise for the default. It would be very good if it were configurable so that I can use 0700 for my private things. -- MalteHelmert 2005-02-11 20:44:36

0770 is usual for user private groups (http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Deployment_Guide/s1-users-groups-private-groups.html), and both Debian and Red Hat use UPG by default these days. -- KarlPinc 2024-11-23 02:33:00

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/BadFilePermissionsAfterMigration (last edited 2012-02-07 20:19:00 by meme-net)