4

Folder : /usr/share/themes

I was trying to beautify my desktop so downloaded some themes. Found out that I don't have permission to paste the theme files to the above folder. So I used the guide here: Give user write access to folder

This has messed up the system theme & now the folder is inaccessible and the system has a white theme (which I presume means no theme). Running stat themes gives :

xx@TPX260:/usr/share$ stat themes
  File: 'themes'
  Size: 4096        Blocks: 8          IO Block: 4096   directory
Device: 801h/2049d  Inode: 2228383     Links: 17
Access: (0666/drw-rw-rw-)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2016-10-18 09:38:10.786996316 +0100
Modify: 2016-10-18 09:33:18.320935727 +0100
Change: 2016-10-18 09:35:18.308242550 +0100
 Birth: -

How can I get permissions of the directory back to the OS default so that themes can start working again?

Kayote
  • 549
  • 2
  • 6
  • 18

1 Answers1

4

It's not read/write permission causing your problem - directories need x permission to be accessed. That one should have mode 755, not 666

sudo chmod 755 /usr/share/themes

Check it looks like this:

$ ls -ld /usr/share/themes
drwxr-xr-x 43 root root 4096 Apr 20 23:13 /usr/share/themes

Check the permissions on the theme directories inside - they need to have 755 permissions as well

When you really need to add something to a system (root owned) directory, don't touch the file permissions at all - just use sudo to get elevated permissions for one command, for example:

sudo cp my_file /path/to/system/directory
Zanna
  • 70,465
  • Thankyou @Zanna. While the folder access has become 0755/drwxr-xr-x, however, the system is still not able to pickup the theme files & they are appearing in 'dark-green' color. – Kayote Oct 18 '16 at 10:55
  • Just noticed, the individual theme files within the folder still have permissions of 0666/drw-rw-rw-... – Kayote Oct 18 '16 at 10:56
  • 1
    @Kayote ah I see you need to chmod 755 all the theme directories too – Zanna Oct 18 '16 at 10:59