PEBKAC 2008 ;) [was: Re: Stupid Ubuntu 8.10

Mario Vukelic mario.vukelic at dantian.org
Sat Nov 8 15:58:30 UTC 2008


On Sat, 2008-11-08 at 09:51 -0500, vafa at aol.com.au wrote:
> Thanks for your help. cp -rp worked perfectly.

Great. I'm not sure whether you ls listings below were done before or
after it worked, but what you posted has several issues that need to be
corrected if they still exist. Read on ...

>  but why cp -r worked in Ubuntu 8.04 and not in Ubuntu 8.10?

I have no idea. Is it possible that in 8.04 the user account under which
you performed the copy operation was different or had different rights
from the one you used in 8.10?

> The example that I said was just an example, it had nothing to do with
> TeX.

I see

> Also for installing fonts in Ubuntu 8.04, I used to first press Alt+F2
> and then write:
> 
> gksu nautilus /usr/share/fonts/truetype
> 
> and then I would drag and drop my fonts to that window. 

Makes sense I guess

> but this does not works in Ubuntu 8.10, it moves all the fonts to that
> window, but they are not avaliable in openoffice 

I had got that :)

> and if you check that again, it said unreadable, means you even can
> not open that folder.

No surprise, see below:

> the output of "ls -l /usr/share/fonts/truetype" is :
> 
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> total 48
> drwxr-xr-x 2 root root 4096 2008-10-30 09:59 arphic
> drwxr-xr-x 2 root root 4096 2008-10-30 09:58 freefont
> drwxr-xr-x 2 root root 4096 2008-10-30 09:59 kochi
> drwxr-xr-x 2 root root 4096 2008-10-30 09:59 openoffice
> drwxr-xr-x 2 root root 4096 2008-10-30 10:02 thai
> drwxr-xr-x 2 root root 4096 2008-10-30 10:02 ttf-arabeyes
> drwxr-xr-x 2 root root 4096 2008-10-30 09:58 ttf-bitstream-vera
> drwxr-xr-x 2 root root 4096 2008-10-30 10:02 ttf-dejavu
> drwx------ 2 vafa vafa 4096 2008-11-08 20:11 TTF-fonts
> drwxr-xr-x 2 root root 4096 2008-10-30 10:02 ttf-indic-fonts-core
> drwxr-xr-x 2 root root 4096 2008-10-30 10:02 ttf-lao
> drwxr-xr-x 2 root root 4096 2008-10-30 10:02 unfonts
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Notice that the directory TTF-fonts is owned by yafa.yafa instead of
root.root as the others are. Also, the directory's permission of
rwx------ only allows user yafa to change into it (that's what the "x"
is for), but nobody else. The others have rwxr-xr-x, which allows owner
(root), group (root) and everyone else to change into it.

See "man chown" and "man chmod", examples follow ...

> the output of "ls -l /usr/share/fonts/truetype/*" is :
<snipped lots of fonts that are correctly owned by root.root and set to
rw-r--r--. An example follows>
> /usr/share/fonts/truetype/ttf-dejavu:
> total 2332
> -rw-r--r-- 1 root root 558064 2008-05-19 16:44 DejaVuSans-Bold.ttf

And here we have the culprit again:
> /usr/share/fonts/truetype/TTF-fonts:
> total 92604
> -rwx------ 1 vafa vafa   44076 2003-11-05 02:00 alba.ttf
<snipped lots of others like it>

The rest is fine again:
> /usr/share/fonts/truetype/ttf-indic-fonts-core:
> total 1496
> -rw-r--r-- 1 root root  79168 2008-07-04 22:24 lohit_gu.ttf
<snip>

To correct the mess, you will want to perform the following commands,
which set ownerships and permissions correctly:


As user yafa:

chmod 755 /usr/share/fonts/truetype/TTF-fonts
755 sets the mode to rwxr-xr-x, see "man chmod"

chmod 644 /usr/share/fonts/truetype/TTF-fonts/*
644 sets the mode to rw-r--r--

sudo chown -R root.root /usr/share/fonts/truetype/TTF-fonts
(chown changes ownership to user.group, the -R applies it recursively.
To make a file or dir owned by root you need sudo)

> the TeXlive that comes with Ubuntu is old. I use TeXlive 2008 which I
> have downloaded and installed from tug.org/texlive.

I see. I thought TeX is extremely mature and has been more or less
unchanged for many years? Knuth until recently used to pay for found
bugs, no?

In any case, you should have installed into /usr/local. This is the
conventional place for software installed outside the package manager.
Consequently, many of the required paths for software in /usr/local are
already set correctly, the package manager knows not to
touch /usr/local, and so on.

> I am very new to Linux and I have started to read Mark G. Sobell's
> book on Linux (editors, commands and shells)+A practical Guide to
> Ubuntu Linux

Good for you :) Welcome!






More information about the ubuntu-users mailing list