LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 03-25-2008, 08:22 PM   #1
Plasmarobo
LQ Newbie
 
Registered: Aug 2007
Distribution: Fedora 8, Ubuntu 7.10 (previously) and Windows XP MCE
Posts: 11

Rep: Reputation: 0
Permission across Ubuntu and Fedora 8


Previously I was running Ubuntu 7.10. I have since migrated to fedora 8 (probably for no good reason, but Ubuntu took a billion years (closer to 10 minutes) to start, and displayed no splash (as it normally does) for me to judge loading times of specific things. However, that is rather irrelevant. This little introduction brings us into my problem(s).
A) I have about as much knowledge of the terminal as a three year old.
B) I have migrated my home directory (which in a stroke of brilliance after my third re-install of ubuntu I placed on it's own partion) along to fedora and now I can't copy files over. Permissions don't seem to exists for these files (set to uid and gid 1000, which doesn't want to exist).

I have looked around on my own and tried to find a solution, but google and Unix MAN pages are not actually that helpful. How do I "own" these files (not as root, as my user)?
I need these files. If I don't get these files I basically fail my high school trimester.
 
Old 03-25-2008, 08:43 PM   #2
ranger_nemo
Senior Member
 
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
You use the CHange OWNer program... chown

As root, run...
chown newusername.newusername -R /home/oldusername

That will set the user and group to the new user name for every file in /home/oldusername.
 
Old 03-25-2008, 08:58 PM   #3
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,578

Rep: Reputation: 187Reputation: 187
Quote:
Originally Posted by Plasmarobo View Post

How do I "own" these files (not as root, as my user)?
The problem is that the user ID is both a name and a number. Ubuntu and Fedora have given different numbers to the same name. The groups may have both different names and different numbers. So back up the /home/user tree someplace, login as root on Fedora, and try to fix the user ID number and the group names. You can probably fix the user ID number with the usermod -u command. You can probably fix the group number and name with the groupmod command using the -g and -n options. See:

man usermod
man groupmod

and you may also find the chown command handy.

man chown

You are probably better off to make the changes in Fedora rather than Ubuntu.

---------------------
Steve Stites
 
Old 03-25-2008, 09:05 PM   #4
Plasmarobo
LQ Newbie
 
Registered: Aug 2007
Distribution: Fedora 8, Ubuntu 7.10 (previously) and Windows XP MCE
Posts: 11

Original Poster
Rep: Reputation: 0
Awesome, but it doesn't work. For one thing the system did not make me a sudoer by default. I cannot run sudo.
So, how do I edit the sudoers file!? (/etc/sudoers right?)
Would that be the problem? When I ran chmod it return Permissions denied errors for every file,
and I assume sudo would solve this little problema.
I don't have a running Ubuntu right now. I overwrote the root directory with fedora.
 
Old 03-25-2008, 09:06 PM   #5
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
You can even do it from the GUI. Here is how to do it in Fedora. Just log in as root and go to System > Admin > Users and Groups and make a new user and a new account, both 1000 as that is what Ubuntu uses by default. If you want to keep the same account and you just want to change the user ID and account ID to 1000, be sure to make a backup of the data in your home directory first. Also bear in mind that changing UID/GID (rather than simply creating a new user account) will leave certain files - particularly in /tmp and a few in /var - at the old 500 UID/GID. You would have to edit those manually.

Last edited by jay73; 03-25-2008 at 09:08 PM.
 
Old 03-25-2008, 09:12 PM   #6
Plasmarobo
LQ Newbie
 
Registered: Aug 2007
Distribution: Fedora 8, Ubuntu 7.10 (previously) and Windows XP MCE
Posts: 11

Original Poster
Rep: Reputation: 0
Hmmm, so I can do this two ways: Login as root and then
a) Create a new user account to use for these files (or change my uid and break a few tmp or var directories)
b) Use the terminal to change the files in the directory.
Anyway to avoid the root login? I'm updating the system (I'm do everything at once, no patience) and would rather not logout.
 
Old 03-29-2008, 08:38 AM   #7
simplicissimus
Registered User
 
Registered: Mar 2008
Posts: 104

Rep: Reputation: 15
root

The only way to change ownership and permissions on files is by having the authority to do so. Even if you own a file, you can not make it belong to another user.group as a regular user:

Code:
$ chown apache.apache ./txt
chown: changing ownership of `./txt': Operation not permitted
You HAVE to be root to do so, that's not an option, it's a requirement.

Regards,
SIMP

Fedora User

Last edited by simplicissimus; 04-02-2008 at 06:12 AM.
 
Old 03-29-2008, 09:28 AM   #8
carl0ski
Member
 
Registered: Sep 2004
Location: Melbourne, Victoria Australia
Distribution: Support those that support you :)
Posts: 872
Blog Entries: 12

Rep: Reputation: 30
Quote:
Originally Posted by Plasmarobo View Post
Awesome, but it doesn't work. For one thing the system did not make me a sudoer by default. I cannot run sudo.
So, how do I edit the sudoers file!? (/etc/sudoers right?)
Would that be the problem? When I ran chmod it return Permissions denied errors for every file,
and I assume sudo would solve this little problema.
I don't have a running Ubuntu right now. I overwrote the root directory with fedora.
most distros use old school
su command

su
root's password:

root# chown -R newuser:users /home/olduser
 
  


Reply

Tags
chown, fedora 8, recursive


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
Set Permission In fedora core 6 viky Fedora 6 10-16-2007 03:14 AM
Ubuntu - Samba folder permission safapombo Linux - Server 5 04-30-2007 03:48 AM
Ubuntu 6.06 Permission Problems bellaterror Linux - Software 5 06-24-2006 02:22 PM
nfs mount problem on Fedora - permission denied hueofwind Linux - Networking 2 04-12-2006 08:23 PM
VPNC - Permission denied - Ubuntu Linux Mathiasdm Linux - Networking 1 03-10-2006 08:53 AM


All times are GMT -5. The time now is 07:06 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration