Permission issues

This might not be an issue. It could just be that I cannot understand how perms on linux work.

  1. I want to take a .desktop file I have made and put it in /usr/share/applications. I cannot do so because every time I go to paste it says ‘permissions do not allow pasting in this directory’

  2. I am trying to install a theme on libre office which isn’t available on LIbre’s extensions or themes(I guess for copyright issues since it’s designed to resemble word) and I’m getting permission issues there too. When I install it as an extension it shows to be installed but I can’t see it in icons. I tried the other method of copy pasting it to the directory for extensions and I get the same message - ‘permissions do not allow pasting in this directory’. When I went to remove the extension itself from Libre it displayed an error

The theme I was trying to install.

The error message I got when trying to remove it. Posting a screenshot because I can’t copy paste it -

A user here linked me two pages on permission commands and I couldn’t understand them. All I could understand was -

-users don’t have root access(is this the same as sudo?) all the time and I can’t simply paste to a folder which is set to root access.
-Applications also can’t access these folders which I guess is why the extension wasn’t installed properly?
-permissions are handled through different values? like read is 4, write is 2 and execute is 1 though I don’t know how to use this

1 Like

This is bad practice to modify anything in /usr/share.
Its integrity in controlled by the package manager and the contents are owned by packages.
The proper locations to add customizations for all users are /usr/local, /opt, /etc.

Also note that files available to all users are typically read-only for security reasons.
You need administrative privileges, e.g. with sudo to modify/edit such files.

In your case it should look like this:

sudo tee /usr/local/share/applications/test.desktop << EOF > /dev/null
[Desktop Entry]
Type=Application
Name=test
Exec=test
EOF

In general case, you can gain administrative privileges like this:

# Edit/browse files
gedit admin:///path/to/file
nautilus admin:

# Edit file
sudo -e /path/to/file

# Root shell
sudo -i

See also: File permissions and attributes - ArchWiki

Better split the LibreOffice-related issue to a separate thread.

5 Likes

putting it in local/share/applications worked.

I eventually just went with some other theme

Thanks for the help

1 Like

@destinyblade Besides the great advice to check the Arch wiki, if you need to understand permissions of a file or dir i found Midnight Commander(“mc” to run in terminal and package name to install) to be very helpful. It is a terminal based file browser/manager. You may find it a little nerdy to use at first, but i would suggest learning how to use it, as it really comes in handy and will end up being one of your favorite programs after you do/over time. It shows (and lets you edit, if started with the necessary perms for a given file/dir) the perms and ownership in one of the easiest to understand formats i have seen using it’s UI for chmod and chown, Just something for you to know for the next time, or if you get curious.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.