Koozali.org: home of the SME Server
Contribs.org Forums => General Discussion => Topic started by: soprom on December 13, 2009, 05:58:07 PM
-
Someone had the great idea to issue this command "chmod -R 0777 /home" and I'm looking for ways to recover from this situation.
I would save users and ibays contents, delete and recreate them with lazy-tools.
It would leave me with setting permissions manually on other folders.
Any ideas or comments?
-
Someone had the great idea to issue this command "chmod -R 0777 /home" and I'm looking for ways to recover from this situation.
I would save users and ibays contents, delete and recreate them with lazy-tools.
Probably not the best way to do it. Most (maybe all) permissions under /home are predictable, so you should be able to restore them to correct settings via scripting.
-
Probably not the best way to do it. Most (maybe all) permissions under /home are predictable, so you should be able to restore them to correct settings via scripting.
For ibays this should do the trick:
signal-event ibay-modify ibayname
-
Thanks for your comments...
I could use:
# using e-smith to reset permissions in
# /home/e-smith/files/users and
# /home/e-smith/files/samba/profiles (?)
signal-event user-modify-admin
signal-event user-modify <each_user>
chown -R admin:admin /home/e-smith/Maildir
chmod -R 0600 /home/e-smith/Maildir
# using e-smith to reset permissions in /home/e-smith/files/ibays
signal-event group-modify <each_group>
signal-event ibay-modify <each_ibayname>
signal-event domain-modify <domain_name>
# manually reset permissions elsewhere
chown -R admin:admin /home/e-smith/files/samba/printers
chmod -R 2775 /home/e-smith/files/samba/printers
chown -R root:admin /home/e-smith/files/samba/netlogon
chmod -R 0644 /home/e-smith/files/samba/netlogon
chown -R root:root /home/e-smith/files/server-resources
chmod -R 0755 /home/e-smith/files/server-resources
chown -R root:root /home/e-smith/ssl.*
chmod -R 0644 /home/e-smith/ssl.*
chown -R root:root /home/e-smith/web
chmod -R 0755 /home/e-smith/web
chown -R root:root /home/httpd
chmod -R 0755 /home/httpd
# some 0640 and 0644 ?
chown -R root:admin /home/e-smith/db
chmod -R 0640 /home/e-smith/db
-
Thanks, it seems to be the way to go (that, you knew!!)...
I tested with signal-event ibay-modify <ibayname> and permissions switched from 0777 to 2770, with the correct group.