0

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.

  • Can you update your post with the output of ls -ld /path/to/dirname for the directories that are causing the issue? Sounds like a permissions issue: http://en.wikipedia.org/wiki/File_system_permissions – jmunsch Nov 14 '14 at 15:57

3 Answers3

-1

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!

  • You are correct that changing ownership would allow access. However, Changing who owns the files/directories can break other processes that might need access. A better solution would be to See which group has access and add the current user to that group. – jmunsch Nov 16 '14 at 21:53
  • Why did I get down voted for giving a 100% correct answer? – GoOnGetErDone Nov 17 '14 at 00:57
  • 1
    From my previous comment: "Changing who owns the files/directories can break other processes that might need access." ... doing a recursive chown is ONLY partially correct. Which makes it 100% wrong.... MySQL for example? – jmunsch Nov 17 '14 at 17:04
  • I like what you're trying to say, but you're just not warning people enough that what you're doing might be dangerous. – RobotHumans Nov 17 '14 at 23:46
  • My original answer did warn people, someone edited it out... :( – GoOnGetErDone Nov 18 '14 at 00:24
-2

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

  • gksudo is no longer a default.
  • if you don't understand the ramifications of operating as root, you definitely shouldn't be doing it.
  • – RobotHumans Nov 17 '14 at 23:48
  • Can you please ellaborate or guide me in the right direction to why gksudo is not a defualt way ?, or why it should not be used ? . I dont wanna guide people in the wrong direction or myself, but doing this has saved me lots of headaches in the past. – Brandd Newman Nov 18 '14 at 03:23
  • gksudo has been removed from the default install and may be removed at some point altogether... so you shouldn't recommend something that is on the chopping block. – RobotHumans Nov 18 '14 at 05:41