PDA

View Full Version : messed up fonts directory, system only displaying boxes



cwebb
22nd June 2011, 11:54 PM
Hello,
I'm fairly new to linux, but have managed to find my way around up until now. While trying to install new fonts for us in inkscape, I used beesu-nautilus to change the access of my usr/share/fonts directory to +rwx for the admin group.
I hoped by doing this I could move new fonts into the directory without getting permission denied.
Now my system is unable to locate, or have access to any of my fonts, resulting in boxes being displayed in replace of letters, and this is system wide, right from login.
I know I really screwed something up. Any help with this would be awesome. Im using fedora 15 gnome desktop.

Dies
22nd June 2011, 11:59 PM
Reset permissions.


su -
chmod -R 755 /usr/share/fonts
find /usr/share/fonts -type f -exec chmod 644 '{}' \;
chown -R root:root /usr/share/fonts

PabloTwo
23rd June 2011, 12:01 AM
I'd be willing to bet you unset one of the execute bits on that directory. Directories must have all the "x" execute bits set, or they go completely wonky. You should be able to fix it at the command line easily enough:

su
chmod a+x /path/to/the/font/folder
The folder, and it's contents, should then display normally.

---------- Post added at 07:01 PM ---------- Previous post was at 07:00 PM ----------

Dies solution is a bit more thorough.

cwebb
23rd June 2011, 12:06 AM
Thank you for the quick responses!
Im going to try both. I can only see boxes in terminal, but Im going to follow your post from my phone.

PabloTwo
23rd June 2011, 12:24 AM
...I can only see boxes in terminal...
Oh, yeah, I suppose nothing can access the fonts now, including for display characters in a terminal. I didn't think about that. That could be very problematic.

cwebb
23rd June 2011, 12:27 AM
It worked!

I blindly entered the commands in terminal and rebooted. Success!! lol.
Thank you guys for the quick and helpful info. Much appreaciated.

PabloTwo
23rd June 2011, 12:29 AM
You could try "typing in the blind", all of the following in the terminal:

su
enter roots password
chmod a+x /usr/share/fonts

That should work if the problem is only with the directory /usr/share/fonts not with any of the sub-directories.

---------- Post added at 07:29 PM ---------- Previous post was at 07:28 PM ----------

Great... you were a half a step ahead of me there. :)