Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Fedora 8, Ubuntu 7.10 (previously) and Windows XP MCE
Posts: 11
Rep:
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.
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.
Distribution: Fedora 8, Ubuntu 7.10 (previously) and Windows XP MCE
Posts: 11
Original Poster
Rep:
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.
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.
Distribution: Fedora 8, Ubuntu 7.10 (previously) and Windows XP MCE
Posts: 11
Original Poster
Rep:
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.