Re: Need to change uid and gid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday, November 11, 2011 04:22:52 PM Jonathan Ryshpan wrote:
> In the process of upgrading from Fedora-15 to Fedora-16, my uid and gid
> have both been changed from 500 to 1000.  I maintain a "mirror" of my
> system as backup using rsync, so in order for the mirroring to continue
> properly the uid and gid in the mirror filesystem have to be changed to
> match the main one.  There's no problem with my home directory, just use
> "$ chown --recursive 1000.1000" in the mirror of my home directory.
> However there are a few odd files, like my crontab
> file /var/spool/cron/jonrysh which needs to have its uid (but NOT its
> gid) changed.
> 
> Where is a convenient script to do this?  There must be one, since this
> is essentially what was done in the upgrade from Fedora-15 to Fedora-15.
> 
> Many Thanks - jon

I would suggest 
find . -uid 500 -exec chown -h owner \;
find . -gid 500 -exec chgrp -h group \;

The -h option says do the chown or chgrp to the symbolic link
instead of following the symbolic link.  Without the -h option,
the symbolic link is followed, causing the symbolic link ownership
to not be changed.
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux