Restore correct POSIX behaviour on the MyBook World
What is this about ?
You have a Western Digital MyBook World II ("WhiteLight") and
encounter strange behaviour when accessing your files, like those:
Every user can delete any file on a network share (SMB, CIFS and NFS) even
if the file belongs to an other user and permissions are set in a way that this should not be possible (e.g. the directory is mode 0755)
This also happens when you are logged in the MBWE via SSH
Every user also can write/modify files that belong to other users and which permissions
should not allow this (e.g. file is mode 0644).
When logged in the MBWE as non-root user, you can not append to files
What the f... ?!?!
I'm sure the behaviour of ignoring file and directory permissions was meant for
windows users who are used to the fact that anyone can read, write and delete
their files.
However, as I'm a Linux user, such behaviour is absolutely unacceptable for me
and renders the NAS unusable unless it is corrected.
Also some other users experienced strange behaviour
caused by the trustees system - they could not open a file and append to it as non-root user.
What causes this behaviour on the MyBook World?
Unfortunately, Western Digital did not document this behaviour at all, so I
spent weeks to find the source of this bug, errr, feature: The trustees kernel patch.
Once the source of the wrong behaviour was found, it was rather easy to fix:
How to disable the trustees system?
Either:
edit /etc/trustees.conf to your needs. BUT THIS FILE GETS RESET ON EACH REBOOT! ARGH!!!!
or search the call to /usr/sbin/settrustees in /etc/init.d/S99sxminit and replace
it with "/usr/sbin/settrustees -D" to disable the trustees system and restore
normal POSIX behaviour