HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Preserving filesystem ownerships
Operating System - HP-UX
1827367
Members
5937
Online
109963
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2002 02:15 AM
05-11-2002 02:15 AM
A user, i.e joe has a UNIX account on 2 remote sites, and his filesystems is transferred from site A to B by the super user. Transfer is done using rsync or ftp.
Once transfer is completed,user joe also wishes to access the filesystem on both sites, i.e. site A & site B. Site B would initially not contain the filesystems. Both remote sites have different NIS server. Hence the uid for all users is different between the sites. Also, his/her user name could different, or the same as in A.
Upon restoration, how do I write the a script to maintain the ownership of the user joe in site B, so that if joe(uid =1700) has file f1 in site A and also exist in site B as :
username = joebloggs
uid = 2100
file f1 does not exist for joebloggs in B
and another user in site B i.e alice(uid=1700) also has file f1; the ownership of file f1 would be preserved to the proper owner upon transferring to site B, regardless of the difference in uid and user names on both sites ?
Note:
User joe in site A would be accessing the same filesystems in B, but as a different user and different uid.
Thanks. Sorry that this question is really a long one.
Once transfer is completed,user joe also wishes to access the filesystem on both sites, i.e. site A & site B. Site B would initially not contain the filesystems. Both remote sites have different NIS server. Hence the uid for all users is different between the sites. Also, his/her user name could different, or the same as in A.
Upon restoration, how do I write the a script to maintain the ownership of the user joe in site B, so that if joe(uid =1700) has file f1 in site A and also exist in site B as :
username = joebloggs
uid = 2100
file f1 does not exist for joebloggs in B
and another user in site B i.e alice(uid=1700) also has file f1; the ownership of file f1 would be preserved to the proper owner upon transferring to site B, regardless of the difference in uid and user names on both sites ?
Note:
User joe in site A would be accessing the same filesystems in B, but as a different user and different uid.
Thanks. Sorry that this question is really a long one.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2002 02:35 AM
05-11-2002 02:35 AM
Solution
Hi
checkout the section which I answered in this thread and do exactly the same except for the tar.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x037b3f490f4ed61190020090279cd0f9,00.html
I change my false ID's to real ID's using the following command
find . -user joe -exec chown real_user_name {}\;
find . -group joes_group -exec chgrp real_group_name {} \;
if all the files are in one directory or under one directory you can do
chown -R joe:joegroup *
cheers
John.
checkout the section which I answered in this thread and do exactly the same except for the tar.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x037b3f490f4ed61190020090279cd0f9,00.html
I change my false ID's to real ID's using the following command
find . -user joe -exec chown real_user_name {}\;
find . -group joes_group -exec chgrp real_group_name {} \;
if all the files are in one directory or under one directory you can do
chown -R joe:joegroup *
cheers
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2002 02:47 AM
05-11-2002 02:47 AM
Re: Preserving filesystem ownerships
Sounds complicated! What I'd do is look to sync the uid's across sites by editing the passwd files and changing the uid's to a higher number. Don't forget to update the NIS maps. Then chown -R on each filesystem that the user owns. Then using the automounter and nfs I'd share the filesystems to each server they log into. Also I'd make sure that the other users can access the filesystems using their group permissions. If the gid's are different then I'd set up a common group and link /etc/logingroup to /etc/group to ensure that even if the primary groups are different they can still gain access without having to issue the newgrp command.
HTH
Dave.
HTH
Dave.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2002 02:57 AM
05-11-2002 02:57 AM
Re: Preserving filesystem ownerships
Hi
Davids solutions is obviously a better one providing you have time and permission to implement it.
to go one step further would be to merge the two versions of NIS then chnage all files appropiatly and dispense with standard logins.
cheers
John
Davids solutions is obviously a better one providing you have time and permission to implement it.
to go one step further would be to merge the two versions of NIS then chnage all files appropiatly and dispense with standard logins.
cheers
John
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP