Windows 7 is not too bad…

29 12 2009

I have talked in the past about how much I hate Microsoft and their over controlling attempt on keeping users within the lines of “proper” computer use…But as uncontrollable circumstances have it,  I got a copy of Windows 7 on my work computer about a month or 2 ago. Though Vista should have been the death of Microsoft, I am finding Windows 7 to be quite a more pleasant experience, though it still has a handful of little things that piss me off when I use it.

What needs to change in order to make the Ultimate Windows Operating System:

  • Internet Explorer needs to be completely SEPARATE from the rest of the Operating System. It is not a good idea to integrate any part of the Windows OS with the programs that come with the OS by default. I, as well as many others, completely block the Internet Explorer program because it is vulnerable to viruses, Trojans, and other forms of internet based attacks and exploits. Most common, are pop-ups that use Internet Explorer to display on the users system.
  • With the exception of the Desktop, you can not manually move files in folders. That’s right - you can not organize files except by a bunch of predefined selections. This is a BIG issue for some people. Many people go to select large amounts of files but find a few that they do not want so they just move those files out of the way. Sure you could hold CTRL and click on the files to deselect them, but it’s still annoying you can not just move them out of the way. Microsoft, you need to stop trying to CONTROL users, and let them do what they way. Let’s say a user can move their files off of the visible screen or something….that’s ok because it gives computer Gurus like myself the opportunity to make a few $$ here and there giving others a hand. It also makes it let frustrating for the expert computer users to get done what they need done.
  • Get rid of the control panel the way it is and use the classic control panel from 2000 / XP. The classic control panel was perfect and should not have been moved or changed. Also, all the programs in the Control panel have been changed to look different….they look like shit now. We want to the regular grey ugly boxes back because they were easy to read and work with. Now there is so much crap in these programs that unless you are used to it already, it is hard to figure out the first time you go in there. Basically you are turning off existing Windows users from using the new Windows Operating systems. We want something familiar to work with, that is less buggy than previous versions…..that’s all.
  • The start bar is that of Vista. Windows XP / 2000’s start bar is much better. The start bar for Vista is stupid and hard to clearly read and understand it.

Though Windows 7 has a lot of things that irritate me, there are a few new things that I really enjoy.

  • The Calendar is similar to that of Windows vista. I like it. Make it sound off alarms, or send emails when scheduled events take place, etc and we would be set. Just make sure it works with any email provider and not just hotmail / live, etc.
  • Support for multiple monitors is excellent! Being able to drag and drop open program windows from full screen to small screen and vica versa is awesome and should not be altered for future versions now that it is part of the Windows OS.
  • Although the start bar from Windows 7 sucks, you can download a program to change the start bar back to the classic version. I use the program called CSMenu in conjunction with a program to hide the original start menu. Download the latest CSMenu and Start Killer from their websites.
  • Clicking on the shutdown button in the start bar shuts the PC down immediately….it does not ask you any extra questions. Perfect! I never use the log off function anyways.
  • FTP locations show up as shortcuts in My Computer. This is excellent because you can browse your files on the internet as if they were right here on your local computer. I find this to be extremely handy! They should work to make this feature faster and even assign the location a drive letter so local programs can read / write to these FTP locations without any issues.
  • Windows 7 actually seams to run faster than Windows XP does on a fresh install. Can’t argue with that!
  • No More Defrag! Kiss it goodbye. Thank God!

That’s it for now. I’ll write more about Windows 7 as I become more and more familiar with it.

Comments and corrections are welcome. A link back to this page from your own website would be awesome as well!

Written by: John Minton



Ubuntu Server LTS 9.10

29 12 2009

I am the kind of person who thinks up a project and then goes out and learns how to do something as I am doing the project. About 4 months ago I started playing with Ubuntu because I needed to get a good web server going. Though the learning curve was huge for the first 2 days, I had found myself becoming fluent in moving about the OS in no time at all. Today I find that Ubuntu is much easier and faster to work with than a Windows Machine.

Ubuntu Server 9.10 is a text based operating system. The OS’s low CPU and RAM usage allows you to run services smoothly and without trouble.

I would like to share with you my Quick Refernce guide to the basics of Ubuntu Server 9.10, and how to navigate through the OS.

The first thing you need to understand about Linux is that it’s focus is around security - An operating system connected to the Internet without security is like leaving your house unlocked. Ubuntu, as well as many other varieties of linux, have a specific user system that controls what each user can and can not do.

  • The user root is equivalent to Administrator on a Windows Machine.
  • When you are logged in as a user other than root, you can use the command sudo to execute a function as the root user. pico is a basic text editor. Normally used like pico filename.txt. But if you are logged in as a user other than root, should you need to edit a file as the root user you would use sudo pico file.txt. It asks you for the root accounts password after that. Upon successful entry of the password it will not ask you for it again for the duration of that session (until you log off).

Each file has a user and a group it belongs to, as well as a set of permissions represented by a 10 digit string composed of dashes (-), r, w, x, and d. This can be confusing at first, but I promise, with a little bit of effort and repetition, you will have it down pat.

We can set the user and group of each file, as well as the permissions of each, with 2 commands. CHOWN and CHMOD. After I explain the permissions, I will explain how to change or set them.

Here is a break down of what each mark means and how they all work together.

  • Each file’s permissions are represented by 10 spaces: - — — —. Here we have broken it up into 4 different groups separated with spaces.
  • The 1st dash is the flag for directory or file. Example: d——— is a directory, If the d was a -, it would be a file.
  • The 2nd group contains 3 dashes. These 3 marks represent the read, write and execute permissions for the user of the file. Example: Permissions drwx—— means it is a directory where the user has full control over the file.
  • The 3rd Group contains 3 dashes as well. These are the read, write and execute permissions for the group the file belongs to. For example, lets say the poem.txt belongs to user john and group public (john:public). If we want to set the permissions to allow user account john full control over the file to read and write to the file, but limit the public group so they can only read the file. it would look like this: -rwxr—–.
  • The fourth group also contains 3 dashes. These are read, write and execute permissions for all other users on the system.

At this point, login to your box with your root account and navigate the the /var directory. Type ls -l to list off the contents of this directory. (In caps that is LS -L).

root@webserver:# cd /
root@webserver:/# cd var
root@webserver:/var# ls -l
total 52
drwxr-xr-x  2 root     root     4096 2009-12-12 06:37 backups
drwxr-xr-x 12 root     root     4096 2009-10-18 03:01 cache
drwxrwxrwt  2 root     root     4096 2009-03-27 02:42 crash
drwxr-xr-x 49 root     root     4096 2009-12-03 15:24 lib
drwxrwsr-x  2 root     staff    4096 2009-04-13 03:33 local
drwxrwxrwt  3 root     root       60 2009-12-29 06:49 lock
drwxr-xr-x 16 root     root     4096 2009-12-29 06:49 log
drwxrwsrwt  2 root     mail     4096 2009-12-27 07:14 mail
drwxr-xr-x  2 root     root     4096 2009-10-15 16:03 opt
drwxr-xr-x 17 root     root      600 2009-12-29 11:35 run
drwxr-xr-x  7 root     root     4096 2009-11-30 12:05 spool
drwxrwxrwt  2 root     root     4096 2009-04-13 03:33 tmp
drwx——  2 root     bin      4096 2009-12-01 22:17 webmin
drwxrwx— 13 www-data www-data 4096 2009-12-12 12:42 www
drwxr-xr-x  2 root     root     4096 2009-12-09 00:44 www-backup
root@webserver:/var#

You can see of the left we have the permissions of each file, followed by the user, then the group, then the modification date, then the file name. All of the files in my /var directory are directories themselves - you can see this with the d in the beginning of the permissions. Let’s look at the backups folder here. It is a directory, the user account root can read, write and execute (run) the file. It belongs to group root, which can read and execute the file only but can not modify the file. Everyone else can execute it and that is all.

If one wishes to change the user or group of a file (or mulltiple files / folders), you can use the chown program/function.

chown user:group /folder/file

…And if you want to change the permissions of the users / group then use chmod.

chmod 770 /folder/file.txt

This next little part might get a little confusing for some people. That’s OK!!! Don’t stress on it because it just takes a little time to get used to and understand all of this. Chmod uses 4 (sometimes 3) numbers to represent the same permissions represented by the d-xw–rx-rx- permissions string. Each number represents one of the 3 groups - user, group, and everyone else. The directory flag can not be changed with chmod or chown.

r = 4, w = 2, x =1

We add up the values of the permissions. So the number 7 means read, write and execute because 4+2+1 = 7. The number 3 is equal to write and execute because w = 2, x = 1 and 2+1=3. Example: Let’s set a file (poem.txt) to allow the the user full control, and no access for anyone else (ie -rwx—— or 700):

chmod 0700 /var/folder/poem.txt.

Now let’s change the user and group to root:

chown root:root /var/folder/poem.txt

Both chmod and chown will execute and return no confirmation message weather they fail or are successful. If we want the programs to return a confirmation message, we simply pass them a -v.

-v = Verbouse (Flags are case sensitive. This one is lower case.) If we need to change the permissions of a file or folder we do:

chmod -v 770 /var/folder/poem.txt

This should return something similar to:

mode of `poem.txt’ changed to 0770 (rwxrwx—)

If we need to change multiple files inside of a directory, we can use the -R flag to recursively apply permissions to all files and folders within the folder specified. Use the -v flag to make the programs return a message with each file they attempt to change.

chmod -R -v 0770 /test

root@webserver:~# chmod -R -v 0770 test
mode of `test’ changed to 0770 (rwxrwx—)
mode of `test/somefolder’ changed to 0770 (rwxrwx—)
mode of `test/somefolder/poem.txt’ changed to 0770 (rwxrwx—)
mode of `test/testing_area’ changed to 0770 (rwxrwx—)
mode of `test/t’ retained as 0770 (rwxrwx—)
mode of `test/t/test.txt’ changed to 0770 (rwxrwx—)
mode of `test/abc’ changed to 0770 (rwxrwx—)
root@webserver:~#

I want to point out something that, I hope, will stop you from accidentally making a mistake in the future. When using chmod, chown, or you are just moving about your files…..make sure you reference files properly. If you go cd foldername then you should now be in /foldername. If you are in /var/www and type cd foldername you will get a message that the folder or file does not exist. But if you type cd /foldername you will be “moved” to /foldername. When working with chmod once, I accidentally put a slashes in front of an Astrix and it  started changing the permissions of my entire system!!! Bad move I tell you! A lot of stuff stopped working because of it, and it took me a long time to fix it.

Example of what not to do:

If you are in /var/www/ and want to chmod all the stuff in there, you can do something like:

chmod -R -v 0770 *

If you type

chmod -R -v 0770 /*

It will Chmod your entire computers contents. So I am assuming that you are logged in as root, correct? root can and will change permissions to all files on the computer if you mess up like I did. This is one small reason why we do no use the root account for casual computer activities, etc. We should not ever even have to log in as root. We should always login as another user, other than root, and use the sudo function/program to execute programs as the root user.

So, for instance, if I am logged in as user john and I need to chmod a file as root, it would look like this:

john@webserver:~/test/somefolder# sudo chmod -R -v 0770 poem.txt
mode of `poem.txt’ retained as 0770 (rwxrwx—)
john@webserver:~/test/somefolder#

To change directory use cd, you can specify relative folders in the same directory that you are in, or you can specify the absolute path to the directory by placing a slash in the front of the folder.

cd /directory/folder2

Use chmod to change file permissions.

Use chown to change the user and group a file of folder belongs to.

In my next post I am going to be setting up a web server on Ubuntu Server 9.10. I will go over the installation of extremely useful programs such as SSH, Apache, PHP, MySQL, Curl, and FTP. I may even venture off into VMWare Server, and Openfire XMPP Jabber Server.

Comments and corrections are welcome.

Also, links back to this post are extremely appreciated as well ;D

Written by: John Minton