Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

chown problem

Status
Not open for further replies.

bcar72

IS-IT--Management
Jun 11, 2009
17
US
i am trying to change ownership on a directory and i receive a not owner error any help is appreciated.
 
only the owner or root can change the ownership of directories and files.

you will need to get the owner to make the change for you.

A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

35 years Bell, AT&T, Lucent, Avaya
Tier 3 for 25 years and counting
 
i tried as root which should have the privileges, root owns it on the remote server and then comes over as a i and cant change owner back to root, is there a way i can carry permissions over when i use the mount command
 
if the two servers are networked and you can use scp.
you can copy it and change ownership on the receiving side if you have a password for iwww.

scp /root/filename i
this will authenticate with i "filename" will belong to i the 192.168.0.1 server



A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

35 years Bell, AT&T, Lucent, Avaya
Tier 3 for 25 years and counting
 
i have to do a nfs mount and not sure why the permissions wont come over or why i cant change them. im stumped
 
is i user in both systems?


A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

35 years Bell, AT&T, Lucent, Avaya
Tier 3 for 25 years and counting
 
try adding i the source server and matching the uid / gid in /etc/password for both. Then you can use chown iwww


A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

35 years Bell, AT&T, Lucent, Avaya
Tier 3 for 25 years and counting
 
how can i modify the uid to match can i set it in the mount command one is 106 and the other is 109 for the i
 
If you are root, you can change the uid in /etc/passwd
Just make sure 106 and 109 are not used by anyone else.

If they are used by other logins, find numbers in both systems that are not used (198, 199)

A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

35 years Bell, AT&T, Lucent, Avaya
Tier 3 for 25 years and counting
 
Hi, can you paste the line from the exports file? Sound like you have some ID squashing set on the export.

root on the client doesn't have root on the server. There's no such thing as elevated privileges in NFS, the UIDs must match.



-----
Cheers,
Henrik Morsing
Join us on irc://chat.freenode.net channel ##aix
 
theres no exports on the linux box and the exports on the hp-ux box only has /oraclebkup in it.

here is the mount command i use

mount server:/oraclebkup /oraclebkup
 
user "iwww" needs to be in both systems and it also need the same uid.

server1 [620891]-> id iwww
uid=101(iwww) gid=101(iwww)
server1 [620892]-> grep ii user:/home/i

server2 [615901]-> id iwww
uid=101(iwww) gid=101(iwww)
server2 [615902]-> grep ii user:/home/i

A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

35 years Bell, AT&T, Lucent, Avaya
Tier 3 for 25 years and counting
 
i did that, the weird thing is the user comes up fine but the group just comes up with a number i.e. group for dba is 502 when i change the group number to 402 it just comes up with a number when i do a ls -la not the group name
 
so now do "chgrp -R iit will change the 502 to i whatever the group name is

you may also need to change /etc/group files

A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

35 years Bell, AT&T, Lucent, Avaya
Tier 3 for 25 years and counting
 
drwxrwxrwx 14 106 hpsmh 8192 Jun 10 11:49
drwxrwxrwx 2 106 hpsmh 96 Jun 3 09:54 lost+found
drwxrwxrwx 21 106 hpsmh 8192 Jun 4 11:08
drwxrwxrwx 4 106 hpsmh 96 Jun 6 23:32

this may help you, i need 106 to oracle, i change the passwd file to match id and its fine, the hpsmh needs to be dba group i change the group id in the passwd file and the command you gave me and it doesnt change
 
chown -R oracle.dba directory_name (will change owner and groups for all files + subdirectories)

chown -R oracle directory_name
chgrp -R dba directory_name

make sure /etc/passwd and /etc/group are defined for oracle and dba and the same ids in each server

A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

35 years Bell, AT&T, Lucent, Avaya
Tier 3 for 25 years and counting
 
i get a not owner error when i try to use chown or chgrp
 
u must be root

A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

35 years Bell, AT&T, Lucent, Avaya
Tier 3 for 25 years and counting
 
i got it thanks for all your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top