cancel
Showing results for 
Search instead for 
Did you mean: 

ownership of a file

former_member227600
Contributor
0 Kudos

Hi Friends,

I am working on AIX operating system ,sap4.7 & oracle DB.

Can any one tell me how can i check the ownership of a file in AIX.And how can change the owner of a file .

Thanks & Regards

Karan

Accepted Solutions (0)

Answers (2)

Answers (2)

JPReyes
Active Contributor
0 Kudos

if you logon as root and go to the directory where the file is located then just use command ls -la to list files and attributes like this

<permissions> <owner> <group> <size> <date> <file>

drwxrwxrwx 2 ora<sid> dba 512 May 23 14:47 test

to change the owner use command chown <user>:<group> <file>

Regards

Juan

Former Member
0 Kudos

Logon to the AIX system via telnet or X-terminal.

Go to the directory where the file is located with cd /<your_directory/<your_sub_dir>

give command: ls -ls <filename> to see owner and group for file.

to change owner:

chown <new_owner> <filename>

to change group:

chgrp <new_group> <filename>

some shells (not all) even allow to change owner and group at the same time:

chown <new_owner>:<new_group> <filename>