Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-09-2008, 06:00 PM   #1
Registered: Feb 2008
Posts: 53

Rep: Reputation: 15
File owned by "root"

Ok so I made a folder with the terminal and now I can't do anything to the file because it says that the owner is "root" and that's not me. I am the administrator of the computer and everything though.
Old 03-09-2008, 06:05 PM   #2
Registered: Feb 2005
Distribution: Ubuntu, CentOS
Posts: 585

Rep: Reputation: 35
Change folder's owner while you're root

You need to become root. If this is a Debian-based system, then
sudo chown -R your-name:your-name full-path-to-folder

For example

sudo chown -R tsmith:tsmith /some-path/some-folder

If this is an RPM-based system, like Fedora, CentOS, or RHEL (and there are more), then su to root, and issue the chown command above but without the sudo prefix.
Old 03-09-2008, 06:07 PM   #3
Registered: Feb 2008
Posts: 53

Original Poster
Rep: Reputation: 15
I'm using Ubuntu
Old 03-09-2008, 06:14 PM   #4
Senior Member
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Ubuntu is a Debian-based system. The command should work. If it doesn't, try become root as follows:
su -
<enter password>
chown -R tsmith:tsmith /some-path/some-folder
where tsmith:tsmith is your username and your group.

Last edited by pwc101; 03-09-2008 at 06:16 PM.
Old 03-09-2008, 06:21 PM   #5
Registered: Feb 2008
Posts: 53

Original Poster
Rep: Reputation: 15
worked thanks


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie question: whats the difference between "su root", "su" and "su -&quo mojarron Slackware 9 12-07-2009 05:08 PM
Logged in as "root"/Fedora 8 but get "Operation not permitted" when using "chmod etc gosunlee Linux - Newbie 7 02-10-2008 06:56 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 11:18 PM
Make a file owned by root owned by a user sharpie Linux - Newbie 2 02-26-2004 02:26 AM
empty files named "1" owned by root ??? kkempter Linux - General 3 07-09-2003 03:07 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:35 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration