Swizzling.org

Welcome to swizzling kids. The site with no real purpose and shocking low levels of content.

MySQL 5.1 installer Could not start Service …

April 1st, 2009 . by Dave

Error Message: Could not start Service …

Problem: Installer can’t create my.ini properly when you use anything but the default settings during the initial configuration soo…

Solution:

1.Remove Instance
2. Uninstall MySQL
3. Delete %alluserprofile%\Application Data\MySQL
4. Delete rest of %programfiles%\MySQL
5. Reboot  (not 100% sure if required but Windows likes reboots)
6. Reinstallation of MySQL
7. Creation of MySQL Instance with default values
8. Reconfiguration of the Instance with the Configuration Tool

Remote Desktop login screen black

April 1st, 2009 . by Dave

It’s annoying and confusing. A black login screen? Yes my friends it does happen and its usually a sign of a registry problem. Either corruption or user error. Any easy enough to fix.
Just whack the following into a text file and name is fixblackscreen.reg. Double click your new file and all should be good.

[HKEY_USERS\.DEFAULT\Control Panel\Colors]
“ActiveBorder”=”212 208 200″
“ActiveTitle”=”10 36 106″
“AppWorkSpace”=”128 128 128″
“Background”=”102 111 116″
“ButtonAlternateFace”=”181 181 181″
“ButtonDkShadow”=”64 64 64″
“ButtonFace”=”212 208 200″
“ButtonHilight”=”255 255 255″
“ButtonLight”=”212 208 200″
“ButtonShadow”=”128 128 128″
“ButtonText”=”0 0 0″
“GradientActiveTitle”=”166 202 240″
“GradientInactiveTitle”=”192 192 192″
“GrayText”=”128 128 128″
“Hilight”=”10 36 106″
“HilightText”=”255 255 255″
“HotTrackingColor”=”0 0 128″
“InactiveBorder”=”212 208 200″
“InactiveTitle”=”128 128 128″
“InactiveTitleText”=”212 208 200″
“InfoText”=”0 0 0″
“InfoWindow”=”255 255 225″
“Menu”=”212 208 200″
“MenuText”=”0 0 0″
“Scrollbar”=”212 208 200″
“TitleText”=”255 255 255″
“Window”=”255 255 255″
“WindowFrame”=”0 0 0″
“WindowText”=”0 0 0″

Linux – Multiple FTP users, same directory, different permissions.

April 1st, 2009 . by Dave

Recently somebody asked me how to have a few users able to access the same directory over FTP. But only allow some of them to have read-write access, and let the rest be read-only.

I use vsftp which needs to be modified a little bit for this to work.

edit /etc/vsftp/vsftpd.conf   (on CentOS, your distro may store the .conf somewhere else)

You’ll need to change “local_umask” from 022 to 0007. Save and restart the service

/etc/init.d/vsftpd restart

# Add 2 new groups, one for read only users and the other will be for the read-write guys

groupadd ftp-readonly
groupadd ftp-readwrite

# Create a document store where all FTP users will access once they are logged in. always a good idea to put it in /home

mkdir /home/ftp-docs
chmod 775 /home/ftp-docs/
chown root:ftp-readwrite /home/ftp-docs

# Add the new users

useradd -g ftp-readwrite -d /home/ftp-docs user1
useradd -g ftp-readwrite -d /home/ftp-docs user2
useradd -g ftp-readonly -d /home/ftp-docs user3

# Set the users password

passwd user1
passwd user2

And your done.

The reason you need to change the umask is when a new directory is created by a read-write user the permissions by default don’t give full write-write access, I believe it’s read-only (for other users in the group).

So user1 can create a directory but only user1 can remove it.