0

I am trying to copy a folder into the user/share/themes folder on Ubuntu 14.04, and it's telling me I cannot do this because I am not "owner". So I right-clicked the usr/share/themes folder > Properties > Permissions tab and tried to change the permissions but they're all greyed-out/disabled.

So then I opened up Terminal, entered groupmod TAB TAB TAB > sudo adduser jase root to try and get higher permissions or something - and it worked. I verified that I added myself as root by id jase. But that still didn't fix the problem. I still can't copy folders or files to usr/share/themes folder.

How can I do this? How do I become "owner"?

jay_t55
  • 403

2 Answers2

2

You copy the file using sudo

sudo cp file destination

For directories use th -R flag

sudo cp -R directory destination

If the files or directories have spaces, you have to quote or escape ( \ ) them

sudo cp "file with spaces" destination
sudo cp file\ with\ spaces destination

For information on Linux permissions and the use of sudo, see:

https://help.ubuntu.com/community/RootSudo

and

https://help.ubuntu.com/community/FilePermissions

Rinzwind
  • 309,379
Panther
  • 104,528
0

You can't copy directories with cp in linux, unfortunately. The other answer is correct that you need root privledges with sudo, but you should do something like this to copy a directory:
cd /home/jase/Downloads
tar cvf flattastic.tar flattastic/
sudo mv flattastic.tar /usr/share/themes/
cd /usr/share/themes
sudo tar xvf flattastic.tar
sudo rm flattastic.tar

BUT, in your specific case, there's something else you can do, I think.

Try
cd ~
mkdir .themes
mv /home/jase/Downloads/flattastic/ ~/.themes/flattastic
You might have to log out and back in, but I think that this would let you add themes without using sudo or root privledges at all.