I have a number of F14 partitions which must be mounted unchanged on the new F16 system. It turns out that I get unexpected permission problems with this approach. I use the same user name on both systems but on F14 I got userID 500 whereas on F16 it became 1000. I wasn't aware of that but learned it the hard way. When I chowned the permissions to 1000:1000 it worked on F16 but now not on F14.
What is the proper way to fix this problem? I am tempted to reinstall F16 and force my userID to 500, but the system warns me not to create userIDs < 1000. It is not feasible to clone the partitions due to space constrains so I am not able to have identical partitions with different permissions.
On 06/07/2012 05:26 AM, Erik P. Olsen wrote:
I have a number of F14 partitions which must be mounted unchanged on the new F16 system. It turns out that I get unexpected permission problems with this approach. I use the same user name on both systems but on F14 I got userID 500 whereas on F16 it became 1000. I wasn't aware of that but learned it the hard way. When I chowned the permissions to 1000:1000 it worked on F16 but now not on F14.
What is the proper way to fix this problem? I am tempted to reinstall F16 and force my userID to 500, but the system warns me not to create userIDs < 1000. It is not feasible to clone the partitions due to space constrains so I am not able to have identical partitions with different permissions.
The "proper" way to fix this is to do it on the F14 system.
Change your password entry to have uid:gid of 1000:1000. Make the change to the group file to change it to 1000 as well.
Then, go to all the top of all partitions/directories owned by 500 and chown -R 1000:1000. In other words, make all the changes on the F14 side.
I had to go through this process when I installed F16 since my RHELv4 system had me as 500:500 and I NFS mount my directories from there. Just took 5 or so minutes.
Reinstalls are never needed to change a user's gid/uid.
On Wed, Jun 06, 2012 at 11:26:03PM +0200, Erik P. Olsen wrote:
I have a number of F14 partitions which must be mounted unchanged on the new F16 system. It turns out that I get unexpected permission problems with this approach. I use the same user name on both systems but on F14 I got userID 500 whereas on F16 it became 1000. I wasn't aware of that but learned it the hard way. When I chowned the permissions to 1000:1000 it worked on F16 but now not on F14.
What is the proper way to fix this problem? I am tempted to reinstall F16 and force my userID to 500, but the system warns me not to create userIDs < 1000. It is not feasible to clone the partitions due to space constrains so I am not able to have identical partitions with different permissions.
-- Erik -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
### End of Message from Erik P. Olsen ###
You said you wanted to not modify the F14 volumes:
mount -o ro,uid=1000,gid=1000 /path/to/device /path/to/mountpoint
This allows you to access the stuff on your F14 volume as you, but disallows you changing anything.
If you are truly migrating away from F14 then you need to mount rw and change the ownership of the stuff.
On 06/06/2012 04:39 PM, Jeff Gipson wrote:
On Wed, Jun 06, 2012 at 11:26:03PM +0200, Erik P. Olsen wrote:
I have a number of F14 partitions which must be mounted unchanged on the new F16 system. It turns out that I get unexpected permission problems with this approach. I use the same user name on both systems but on F14 I got userID 500 whereas on F16 it became 1000. I wasn't aware of that but learned it the hard way. When I chowned the permissions to 1000:1000 it worked on F16 but now not on F14.
What is the proper way to fix this problem? I am tempted to reinstall F16 and force my userID to 500, but the system warns me not to create userIDs < 1000. It is not feasible to clone the partitions due to space constrains so I am not able to have identical partitions with different permissions.
-- Erik -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
### End of Message from Erik P. Olsen ###
You said you wanted to not modify the F14 volumes:
mount -o ro,uid=1000,gid=1000 /path/to/device /path/to/mountpoint
This allows you to access the stuff on your F14 volume as you, but disallows you changing anything.
If you are truly migrating away from F14 then you need to mount rw and change the ownership of the stuff.
Erik would do well by following Ed's suggestion. In fc16, mounting ext3/ext4 filesystems no longer accepts uid=xxx,gid=xxx To wit:
in fstab: . . . UUID=83c35e7b-41eb-469b-af1f-d5a72007e54c /sdc1 ext3 uid=2013,gid=2013 0 0 . . .
# mount /sdc1 mount: wrong fs type, bad option, bad superblock on /dev/sdc1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so
I restored fstab to make mount options default: . . . UUID=83c35e7b-41eb-469b-af1f-d5a72007e54c /sdc1 ext3 default 0 0 . . .
# mount /sdc1 # mount | grep sdc1 /dev/sdc1 on /sdc1 type ext3 (rw,relatime,user_xattr,acl,barrier=1,nodelalloc,data=ordered)
Cheers,
JD
On 07/06/12 01:27, Ed Greshko wrote:
On 06/07/2012 05:26 AM, Erik P. Olsen wrote:
I have a number of F14 partitions which must be mounted unchanged on the new F16 system. It turns out that I get unexpected permission problems with this approach. I use the same user name on both systems but on F14 I got userID 500 whereas on F16 it became 1000. I wasn't aware of that but learned it the hard way. When I chowned the permissions to 1000:1000 it worked on F16 but now not on F14.
What is the proper way to fix this problem? I am tempted to reinstall F16 and force my userID to 500, but the system warns me not to create userIDs< 1000. It is not feasible to clone the partitions due to space constrains so I am not able to have identical partitions with different permissions.
The "proper" way to fix this is to do it on the F14 system.
Change your password entry to have uid:gid of 1000:1000. Make the change to the group file to change it to 1000 as well.
Then, go to all the top of all partitions/directories owned by 500 and chown -R 1000:1000. In other words, make all the changes on the F14 side.
I had to go through this process when I installed F16 since my RHELv4 system had me as 500:500 and I NFS mount my directories from there. Just took 5 or so minutes.
Reinstalls are never needed to change a user's gid/uid.
I thought of this at the very beginning but I never found out how to change userID from 500 to 1000. Please explain how to do that.
Thanks
On 06/07/2012 08:20 PM, Erik P. Olsen wrote:
On 07/06/12 01:27, Ed Greshko wrote:
On 06/07/2012 05:26 AM, Erik P. Olsen wrote:
I have a number of F14 partitions which must be mounted unchanged on the new F16 system. It turns out that I get unexpected permission problems with this approach. I use the same user name on both systems but on F14 I got userID 500 whereas on F16 it became 1000. I wasn't aware of that but learned it the hard way. When I chowned the permissions to 1000:1000 it worked on F16 but now not on F14.
What is the proper way to fix this problem? I am tempted to reinstall F16 and force my userID to 500, but the system warns me not to create userIDs< 1000. It is not feasible to clone the partitions due to space constrains so I am not able to have identical partitions with different permissions.
The "proper" way to fix this is to do it on the F14 system.
Change your password entry to have uid:gid of 1000:1000. Make the change to the group file to change it to 1000 as well.
Then, go to all the top of all partitions/directories owned by 500 and chown -R 1000:1000. In other words, make all the changes on the F14 side.
I had to go through this process when I installed F16 since my RHELv4 system had me as 500:500 and I NFS mount my directories from there. Just took 5 or so minutes.
Reinstalls are never needed to change a user's gid/uid.
I thought of this at the very beginning but I never found out how to change userID from 500 to 1000. Please explain how to do that.
OK.... Let's say that your user name on the F14 system is olsen.....
The entry in /etc/passwd is probably
olsen:x:500:500:Erik olsen:/home/olsen:/bin/bash
and /etc/group is probably
olsen:x:500:
Just change those to...
olsen:x:1000:1000:Erik olsen:/home/olsen:/bin/bash and olsen:x:1000:
And then....
chown -R 1000:1000 /home/olsen
along with any other directories or file systems that were previously owned by uid 500 gid 500.
That's all...
On 06/07/2012 04:35 PM, Ed Greshko wrote:
On 06/07/2012 08:20 PM, Erik P. Olsen wrote:
On 07/06/12 01:27, Ed Greshko wrote:
On 06/07/2012 05:26 AM, Erik P. Olsen wrote:
I have a number of F14 partitions which must be mounted unchanged on the new F16 system. It turns out that I get unexpected permission problems with this approach. I use the same user name on both systems but on F14 I got userID 500 whereas on F16 it became 1000. I wasn't aware of that but learned it the hard way. When I chowned the permissions to 1000:1000 it worked on F16 but now not on F14.
What is the proper way to fix this problem? I am tempted to reinstall F16 and force my userID to 500, but the system warns me not to create userIDs< 1000. It is not feasible to clone the partitions due to space constrains so I am not able to have identical partitions with different permissions.
The "proper" way to fix this is to do it on the F14 system.
Change your password entry to have uid:gid of 1000:1000. Make the change to the group file to change it to 1000 as well.
Then, go to all the top of all partitions/directories owned by 500 and chown -R 1000:1000. In other words, make all the changes on the F14 side.
I had to go through this process when I installed F16 since my RHELv4 system had me as 500:500 and I NFS mount my directories from there. Just took 5 or so minutes.
Reinstalls are never needed to change a user's gid/uid.
I thought of this at the very beginning but I never found out how to change userID from 500 to 1000. Please explain how to do that.
OK.... Let's say that your user name on the F14 system is olsen.....
The entry in /etc/passwd is probably
olsen:x:500:500:Erik olsen:/home/olsen:/bin/bash
and /etc/group is probably
olsen:x:500:
Just change those to...
olsen:x:1000:1000:Erik olsen:/home/olsen:/bin/bash and olsen:x:1000:
Why not use the commands "usermod" and "groupmod"? According to the usermod man page, usermod will modify the ownership of almost all user's files (but not of the files outside of the user's home dir).
And then....
chown -R 1000:1000 /home/olsen
along with any other directories or file systems that were previously owned by uid 500 gid 500.
That's all...
On Thu, Jun 07, 2012 at 07:27:23AM +0800, Ed Greshko wrote:
On 06/07/2012 05:26 AM, Erik P. Olsen wrote:
I have a number of F14 partitions which must be mounted unchanged on the new F16 system. It turns out that I get unexpected permission problems with this approach. I use the same user name on both systems but on F14 I got userID 500 whereas on F16 it became 1000. I wasn't aware of that but learned it the hard way. When I chowned the permissions to 1000:1000 it worked on F16 but now not on F14.
What is the proper way to fix this problem? I am tempted to reinstall F16 and force my userID to 500, but the system warns me not to create userIDs < 1000. It is not feasible to clone the partitions due to space constrains so I am not able to have identical partitions with different permissions.
The "proper" way to fix this is to do it on the F14 system.
Change your password entry to have uid:gid of 1000:1000. Make the change to the group file to change it to 1000 as well.
Then, go to all the top of all partitions/directories owned by 500 and chown -R 1000:1000. In other words, make all the changes on the F14 side.
And if you're looking for a shortcut command line, as root:
find / -uid 500 -exec chown 1000 '{}' ; find / -gid 500 -exec chgrp 1000 '{}' ;
I had to go through this process when I installed F16 since my RHELv4 system had me as 500:500 and I NFS mount my directories from there. Just took 5 or so minutes.
Reinstalls are never needed to change a user's gid/uid.
+1
On 06/07/2012 09:09 AM, Joachim Backes wrote:
On 06/07/2012 04:35 PM, Ed Greshko wrote:
On 06/07/2012 08:20 PM, Erik P. Olsen wrote:
On 07/06/12 01:27, Ed Greshko wrote:
On 06/07/2012 05:26 AM, Erik P. Olsen wrote:
I have a number of F14 partitions which must be mounted unchanged on the new F16 system. It turns out that I get unexpected permission problems with this approach. I use the same user name on both systems but on F14 I got userID 500 whereas on F16 it became 1000. I wasn't aware of that but learned it the hard way. When I chowned the permissions to 1000:1000 it worked on F16 but now not on F14.
What is the proper way to fix this problem? I am tempted to reinstall F16 and force my userID to 500, but the system warns me not to create userIDs< 1000. It is not feasible to clone the partitions due to space constrains so I am not able to have identical partitions with different permissions.
The "proper" way to fix this is to do it on the F14 system.
Change your password entry to have uid:gid of 1000:1000. Make the change to the group file to change it to 1000 as well.
Then, go to all the top of all partitions/directories owned by 500 and chown -R 1000:1000. In other words, make all the changes on the F14 side.
I had to go through this process when I installed F16 since my RHELv4 system had me as 500:500 and I NFS mount my directories from there. Just took 5 or so minutes.
Reinstalls are never needed to change a user's gid/uid.
I thought of this at the very beginning but I never found out how to change userID from 500 to 1000. Please explain how to do that.
OK.... Let's say that your user name on the F14 system is olsen.....
The entry in /etc/passwd is probably
olsen:x:500:500:Erik olsen:/home/olsen:/bin/bash
and /etc/group is probably
olsen:x:500:
Just change those to...
olsen:x:1000:1000:Erik olsen:/home/olsen:/bin/bash and olsen:x:1000:
Why not use the commands "usermod" and "groupmod"? According to the usermod man page, usermod will modify the ownership of almost all user's files (but not of the files outside of the user's home dir).
And then....
chown -R 1000:1000 /home/olsen
along with any other directories or file systems that were previously owned by uid 500 gid 500.
As root:
find / -gid 500 -exec chgrp 1000 {} ; find / -uid 500 -exec chown 1000 {} ;
Cheap and dirty. Will change the UID/GID of hidden files as well. ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@alldigital.com - - AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 - - - - I'm telling you that the kernel is stable not because it's a - - kernel, but because I refuse to listen to arguments like this. - - -- Linus Torvalds - ----------------------------------------------------------------------
On 07/06/12 18:09, Joachim Backes wrote:
On 06/07/2012 04:35 PM, Ed Greshko wrote:
On 06/07/2012 08:20 PM, Erik P. Olsen wrote:
On 07/06/12 01:27, Ed Greshko wrote:
On 06/07/2012 05:26 AM, Erik P. Olsen wrote:
I have a number of F14 partitions which must be mounted unchanged on the new F16 system. It turns out that I get unexpected permission problems with this approach. I use the same user name on both systems but on F14 I got userID 500 whereas on F16 it became 1000. I wasn't aware of that but learned it the hard way. When I chowned the permissions to 1000:1000 it worked on F16 but now not on F14.
What is the proper way to fix this problem? I am tempted to reinstall F16 and force my userID to 500, but the system warns me not to create userIDs< 1000. It is not feasible to clone the partitions due to space constrains so I am not able to have identical partitions with different permissions.
The "proper" way to fix this is to do it on the F14 system.
Change your password entry to have uid:gid of 1000:1000. Make the change to the group file to change it to 1000 as well.
Then, go to all the top of all partitions/directories owned by 500 and chown -R 1000:1000. In other words, make all the changes on the F14 side.
I had to go through this process when I installed F16 since my RHELv4 system had me as 500:500 and I NFS mount my directories from there. Just took 5 or so minutes.
Reinstalls are never needed to change a user's gid/uid.
I thought of this at the very beginning but I never found out how to change userID from 500 to 1000. Please explain how to do that.
OK.... Let's say that your user name on the F14 system is olsen.....
The entry in /etc/passwd is probably
olsen:x:500:500:Erik olsen:/home/olsen:/bin/bash
and /etc/group is probably
olsen:x:500:
Just change those to...
olsen:x:1000:1000:Erik olsen:/home/olsen:/bin/bash and olsen:x:1000:
Why not use the commands "usermod" and "groupmod"? According to the usermod man page, usermod will modify the ownership of almost all user's files (but not of the files outside of the user's home dir).
And then....
chown -R 1000:1000 /home/olsen
along with any other directories or file systems that were previously owned by uid 500 gid 500.
That's all...
Oh, this is much more than I anticipated when I planned to move from F14 to F16. And it is not just my userID it is also all the other userIDs on the system. /home/someone is not the biggest problem but there are lots of directories/files all over that have to inspected. I wish there were conditional chown so that it would only change userID to 1000 if it was exactly 500.
Sigh.
On 06/07/2012 10:43 AM, Rick Stevens wrote:
As root:
find / -gid 500 -exec chgrp 1000 \{\} \; find / -uid 500 -exec chown 1000 \{\} \;
At one point, years ago, I knew an option for find that kept it out of places like /dev and /proc to avoid the spew of error messages. Of course, since you're doing this as root, it may not matter, but it would still save you time.
On 06/08/2012 02:27 AM, Erik P. Olsen wrote:
Oh, this is much more than I anticipated when I planned to move from F14 to F16. And it is not just my userID it is also all the other userIDs on the system. /home/someone is not the biggest problem but there are lots of directories/files all over that have to inspected. I wish there were conditional chown so that it would only change userID to 1000 if it was exactly 500.
Well, it may be a bit time consuming..... Go with the "find" as others have suggested. And once you are done....you are done.
On 06/07/2012 12:35 PM, Joe Zeff wrote:
On 06/07/2012 10:43 AM, Rick Stevens wrote:
As root:
find / -gid 500 -exec chgrp 1000 {} ; find / -uid 500 -exec chown 1000 {} ;
At one point, years ago, I knew an option for find that kept it out of places like /dev and /proc to avoid the spew of error messages. Of course, since you're doing this as root, it may not matter, but it would still save you time.
Ok, how about:
find / -not -path "/dev/*" -a -not -path "/proc/*" -a -not -path "/sys/*" -gid 500 -exec chgrp 1000 {} ; find / -not -path "/dev/*" -a -not -path "/proc/*" -a -not -path "/sys/*" -uid 500 -exec chown 1000 {} ;
Or even (to check for uid 500, gid 500 and change both):
find / -not -path "/dev/*" -a -not -path "/proc/*" -a -not -path "/sys/*" -uid 500 -a -gid 500 -exec chown 1000:1000 {} ;
(each "find" is one line, just in case your mail reader wraps them). ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@alldigital.com - - AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 - - - - "Hello. My PID is Inigo Montoya. You `kill -9'-ed my parent - - process. Prepare to vi." - ----------------------------------------------------------------------
On 06/08/2012 12:09 AM, Joachim Backes wrote:
Why not use the commands "usermod" and "groupmod"? According to the usermod man page, usermod will modify the ownership of almost all user's files (but not of the files outside of the user's home dir).
Probably because that's the way I've been doing things for 25+ years and it works for me. So, I never looked for a command to do it. In other words, "no good reason".
Thanks to everybody for providing valuable insight and good solutions to my problem. I now feel confident that I will be able to make an orderly transition to F16.
On Thu, Jun 07, 2012 at 12:35:03PM -0700, Joe Zeff wrote:
On 06/07/2012 10:43 AM, Rick Stevens wrote:
As root:
find / -gid 500 -exec chgrp 1000 \{\} \; find / -uid 500 -exec chown 1000 \{\} \;
At one point, years ago, I knew an option for find that kept it out of places like /dev and /proc to avoid the spew of error messages. Of course, since you're doing this as root, it may not matter, but it would still save you time.
Well, -xdev will keep you on the same file system but if you're starting at / that's probably not what you want. -fstype would probably be more useful since you could conditionalize on ext4 (or what have you).