I am completely new to a Linux operating system and was trying to setup Owncloud to use as a file server. I need to copy the owncloud folder into /var/www/ as an example but every folder on my system I am denied access to other than folders within my home folder. I am logged in as administrator but it tells me I am not the owner and do not have permission to access or make changes to any of the other folders. Any help with this would be greatly appreciated.
3 Answers
You need to take ownership of the directories you want to access.
Open terminal
sudo -s hit enter and authenticate
chown -hR root /u
(change root to the username you want to take ownership) (u is the file path)
Here is an example:
chown -hR username /home/username/.config/ibus
The syntax -hR takes ownership of subfiles and folders too!
Remember command line in linux IS case sensitive.
Why did I lose 2 points for answering this question correctly? It is 100% correct on the money, you just need to take care with which directories you take ownership of as it can cause security issues!
- 600
To install Owncloud on ubuntu properly please follow instruction here: http://www.howtoforge.com/how-to-install-owncloud-7-on-ubuntu-14.04
Also you can access files that are normally denied by running the file manager as root and you can access any folder you like.****Take caution when using this file manager****
Press Alt+F2
then type in
gksudo nautilus
It will ask for your password then you are free to use everything in your computer.
Or do it via terminal first Open terminal
ALT + CTRL + T
copy and paste this code
gksudo nautilus
- 231
Best way to do it is to copy needed files as root
sudo cp -r ORIGIN DESTINATION
You also can change folder owner to yourself with
chown USER.GROUP DIRECTORY
or give write access to it to everyone with
chmod 777 DIRECTORY
These are more dangerous, be careful when doing this and use only with no outer access to the directory.
If you feel yourself better when working with GUI, you can try launching your file manager as root,
sudo nautilus
for example. Again - be very careful. This behaviour was intended to help reduce human errors.
- 2,293
- 1
- 24
- 30
- 395