LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-09-2008, 05:00 PM   #1
TentativeChaos
Member
 
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, 05:05 PM   #2
cmnorton
Member
 
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, 05:07 PM   #3
TentativeChaos
Member
 
Registered: Feb 2008
Posts: 53

Original Poster
Rep: Reputation: 15
I'm using Ubuntu
 
Old 03-09-2008, 05:14 PM   #4
pwc101
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:
Code:
su -
Password:
<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 05:16 PM.
 
Old 03-09-2008, 05:21 PM   #5
TentativeChaos
Member
 
Registered: Feb 2008
Posts: 53

Original Poster
Rep: Reputation: 15
worked thanks
 
  


Reply



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 04:08 PM
Logged in as "root"/Fedora 8 but get "Operation not permitted" when using "chmod etc gosunlee Linux - Newbie 7 02-10-2008 05:56 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
Make a file owned by root owned by a user sharpie Linux - Newbie 2 02-26-2004 01:26 AM
empty files named "1" owned by root ??? kkempter Linux - General 3 07-09-2003 02:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:45 PM.

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