Monthly Archives: November 2011

Linux permissions part 1

Linux files have 2 basic kinds of permissions:

  1. read, write, and execute (rwx) which control if a file can be read, written to, and run (executed).
  2. user and group permissions that control who owns the file and the group of people that have some sort of access to the file.

It’s this second set of permissions that this post covers.

Each file (or directory, which is just really a fancy file that stores information about files) has one owner. That owner has permissions (the read, write and execute kind) that are normally different from others who might have access to a file. An owner of a file can do anything with the file, including changing the permissions on the file (e.g. to give someone else access or revoke someone’s access to a file).

Files are also affected by group permissions. A group is simply a list of users. The simplest way to think of this is an office type environment where you might have different departments: accounting, sales, marketing. Within each of those departments you have staff (Bob, Betty, Billy, etc.). Bob might own a file that he wants to share with the accounting group. The simplest way Bob can do this is with the chown command:

sudo chown bob.accounting nextyearsbudget.odf

Chown changes the ownership of the file, in this case nextyearsbudget.odf, to the user bob (it’s already bob, but you could assign another person ownership), and the group accounting. The period separates the user ownership and the group access. If we listed the nextyearsbudget.odf in a terminal (ls -al nextyearsbudget.odf) we might see permissions like the following:

-rwxrw-r–

The first – identifies the file either as a (-) file, (d) directory or link (l). The next 3 letters, rwx, are the owner’s permissions. Without going into this too much in this case the owner has read, write and execute permission, but this is not always the case. The second set of three characters, rw-, show the group’s permission. In this case they can read and write to the file, but they cannot run the file. Lastly, the r– set of permissions indicates the permissions for all users other than the owner and those in the file’s group. Others can read the file, but not write to it (change it) or execute it. You can deny others permission to even view the file by removing the read permission using the chmod command:

chmod o-r nextyearsbudget.odf

Think of o as others, not owner. User, Group, Others, ugo are used in conjunction with the chmod command. So if you wanted to change both the user/owner’s permission and the group’s permission at the same time you’d type:

chmod ug+x nextyearsbudget.odf

In this case the user/owner already had +x (execute) permission, so all we’ve really done is give the group execute permission. If we listed the same file now we’d see it changed these permissions:

-rwxrwxr–

Again the first character is the type of file (-), the three characters after represent the user/owner’s permission, then the group permission, then the others’ permission. Notice the 7th character in has changed from a – to an x (execute) permission. More on permissions in the next post.

Leave a Comment

Filed under Linux, Technology

Sharing printers with other Ubuntu Linux computers

Making a network printer visible in Ubuntu Linux

Making a network printer visible in Ubuntu Linux

My wife and I have a small network of Ubuntu Linux computers. I run Ubuntu 10.04 on my notebook computer. My wife runs Ubuntu 11.04 on her desktop system. We run Ubuntu 10.04 Netbook remix on a netbook that’s connected to our television (our XBMC system). This evening I needed to share a laser printer connected to my notebook with my wife’s desktop. The printer, a Lexmark Optra 310, installed in Ubuntu 10.04 without me needing to specify which driver. It also automatically checked Sharing. But when I searched for the printer from my wife’s desktop system I couldn’t see it.

Making the printer visible is a simple matter, but not completely obvious. Open the printers:

System > Administration > Printing

Then click Server from the printer menu (don’t click on the printer, the menu is above the printer(s)).   From the drop down menu click Settings. A dialog box will appear. Simply check Publish shared printers connected to this system and click the OK button. Now the network printer is visible to other Ubuntu Linux systems.

 

1 Comment

Filed under Hardware, Linux, Technology

Microsoft Security Essentials, headed in the right direction, but not there yet

Microsoft Security Essentials web site

Microsoft Security Essentials web site

Friends, you know I’m a big fan of Linux and open source. So when I praise Microsoft there’s a good reason for that praise. I’ve praised Microsoft in the past for their Microsoft Registered Refurbisher program which allows not-for-profit (and for-profit) organizations like ours help out people who cannot afford to pay retail prices for a computer with Windows and Office. Now that praise is directed towards their effort to provide a free (at least so far) anti-virus and anti-malware solution anyone can download: Microsoft Security Essentials (MSE).

Why do I like Microsoft Security Essentials? The first reason is because Microsoft has licensed it such that we can provide it on the computers we refurbish. There are a lot of free anti-virus and anti-malware programs around, but if you check the licensing closely it’s for personal use only. If we as a not-for-profit install it on machines we sell (and we have to charge to recoup our licensing costs, build costs, etc.) then anti-virus companies can say we’re profiting from their work. The second reason I like MSE is because it’s not the first time Microsoft has tried to provide anti-virus to consumers. The first time there was a big push back by the large anti-virus companies. It could be seen as anti-competitive, but the reality is that it has been needed as part of the OS for a long time. Since it’s an extra download people still have a choice to install something else. The third reason I like MSE is that it has once or twice detected problems other programs like Malware Bytes and Avast failed to detect.

I issue this praise of Microsoft lightly because Microsoft Security Essentials is still a lightweight when it comes to detecting a large amount of malware and viruses. We’ve installed MSE on a good number of machines only to have them come back infected with viruses and malware. We’ve also noticed that it missed quite a bit of viruses and spyware that others did detect. Still, it’s a step in the right direction. Hopefully Microsoft keeps developing its Microsoft Malware Protection Center, a threat research and response center similar to heavyweights like Symantec.

Good work Microsoft. I still prefer to use Linux, but for many of our clients it’s a great step in the right direction – please keep it up.

 

Leave a Comment

Filed under Technology, Windows