0

I was trying to get install the Inter Font in Elementary OS. In the process, in order to get access to the fonts folder in usr/share, I used this command in the terminal,

sudo chmod 700 -R /usr/share/fonts

Now the fonts folder is broken and as a result, all the system fonts are displayed as rectangles. Luckily, I recognized Firefox from its icon, and now I'm using it to ask this question. I used that command to unlock the usr/share/backgrounds folder by following this tutorial https://askubuntu.com/a/263566, it worked for the backgrounds folder. The problem is that, I don't remember if I used 777 instead of 700 for the backgrounds folder.

Please help me to fix the fonts folder as it has made my only PC practically unusable.

  • On my system the permissions on that folder and all the subfolders is "755" and the owner is "root". However, the font files themselves have permission "644". Looks like you have set the permission of both folders and files to "700". Here is one way of reversing it in the commandline: – Jeremy Wootten Aug 1 at 15:29
0

Run these commands in a terminal will reverse the permission changes:

cd /usr/share/fonts
sudo find -type d -name '*' -exec chmod 755 {} \;
sudo find -type f -name '*' -exec chmod 644 {} \;

The first command makes sure you are in the right folder.
The second command changes the permissions of all the folders.
The third command changes the permissions of all the files.

I strongly suggest you backup the usr/share/fonts folder to safe place before attempting to changes it. I also strongly suggest you first run the second two commands without the -exec ..... part. It will then just list the regular files that will be changed to the terminal and you can double check it is going to change the right ones.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.