Sponsored Content
Operating Systems AIX Unix root directory owner wrong AIX 5.3 Post 302580370 by spike1 on Thursday 8th of December 2011 09:36:42 AM
Old 12-08-2011
Unix root directory owner wrong AIX 5.3

The a chown was done and instead of using ./ a / was used and root ownership files got changed.

I need to change the ownership of the files/directory back - backups are not working and I am concerned a reboot will not be successful.

Can anyone provide the ownership of these files/directories or direct me to where I can find what the default ownership of root and subdir should be?
Below is an ls of the /

Code:
drwxr-xr-x  25 root     system         4096 Dec  5 01:12 .
drwxr-xr-x  25 root     system         4096 Dec  5 01:12 ..
drwxrwxr-x   3 root     system          256 Dec 21 2006  .SPOT
-rw-------   1 root     system         7260 Apr 11 2007  .sh_history
lrwxrwxrwx   1 root     system           20 May 11 2007  .udlibs71 -> /app/ud71/lib/uddlls
lrwxrwxrwx   1 root     system           20 Jul 14 2010  .udlibs72 -> /app/ud72/lib/uddlls
-r--r--r--   1 root     staff            20 Jul 14 2010  .unishared
-rw-------   1 root     system           74 Apr 11 2007  .vi_history
drwxr-xr-x   2 root     system         4096 Mar  7 2008  TT_DB
drwxr-xr-x  10 root     system         4096 May 27 2009  aixmaint
drwxrwxr-x  20 datatel  usr            4096 Apr 18 2011  app
drwxr-x---   2 root     audit           256 Dec 21 2006  audit
-rwxr-x---   1 root     system           25 Dec 17 2007  autobackup
lrwxrwxrwx   1 bin      bin               8 Dec 21 2006  bin -> /usr/bin
-rw-rw----   1 root     system         1323 Dec  4 03:03 bosinst.data
drwxrwx---   2 root     system          256 Sep 10 2007  cdrom
drwxrwxr-x   5 root     system         8192 Dec  8 00:00 dev
drwxr-xr-x  27 root     system         8192 Dec  5 01:15 etc
drwx------   3 root     system         4096 Dec  2 09:59 hlp
drwxr-xr-x   9 datatel  bin            4096 Mar 27 2009  home
-rw-rw----   1 root     system        10544 Dec  4 03:03 image.data
lrwxrwxrwx   1 bin      bin               8 Dec 21 2006  lib -> /usr/lib
drwx------   2 datatel  system          256 Dec 21 2006  lost+found
drwxr-xr-x 139 bin      bin            8192 Mar 31 2009  lpp
drwxr-xr-x   3 root     system          256 Dec 21 2006  mfg
drwxr-xr-x   5 root     system          256 Jun 13 2010  mkcd
drwxr-xr-x   2 bin      bin             256 Dec 21 2006  mnt
drwxr-xr-x  11 root     system         4096 Apr 11 2007  opt
dr-xr-xr-x   1 root     system            0 Dec  8 09:33 proc
drwxrwx---   2 root     system          256 Aug 27 2007  restore
drwxr-xr-x   3 bin      bin             256 Oct 29 2008  sbin
-rw-r--r--   1 root     system          700 Apr 11 2007  smit.log
-rw-r--r--   1 root     system          159 Apr 11 2007  smit.script
-rw-r--r--   1 root     system          307 Apr 11 2007  smit.transaction
drwxrwxr-x   2 root     system          256 Dec 21 2006  tftpboot
drwxrwxrwt  11 datatel  system        20480 Dec  8 09:33 tmp
lrwxrwxrwx   1 bin      bin               5 Dec 21 2006  u -> /home
lrwxrwxrwx   1 root     system           21 Dec 21 2006  unix -> /usr/lib/boot/unix_64
drwxrwxrwx  43 bin      bin            4096 Jul 14 2010  usr
drwxr-xr-x  27 datatel  bin            4096 Mar  6 2008  var
ksh: 1167506 Quit(coredump)

Thank you

Last edited by Scott; 12-08-2011 at 10:55 AM.. Reason: Please use code tags
 

10 More Discussions You Might Find Interesting

1. Cybersecurity

root owner of daemons?

Hi all, what happens if i have a service running as root? if it is exploited what would happen? can a hacker actually becomes a hacker and screw up my whole box? thanks (1 Reply)
Discussion started by: xNYx
1 Replies

2. Shell Programming and Scripting

determine owner directory permissions from within the directory

From within a directory, how do I determine whether I have write permission for it. test -w pwd ; echo ? This doesn't work as it returns false, even though I have write permission. (4 Replies)
Discussion started by: Sniper Pixie
4 Replies

3. UNIX for Dummies Questions & Answers

how to find a path within unix root directory

I need to know whether nyfile/mypath exists on the file system in the root directory. How to do this (1 Reply)
Discussion started by: ramky79
1 Replies

4. UNIX for Advanced & Expert Users

How UNIX admin set up this? how files of 744 of other owner can be removed by another owner?

Hi all, We have some files are under 744 permissions and the the owner is say owner1 and group1. Now we have another user owner2 of group2, owner2 can remove files of the owner1 and the permission of those files are 744, unix admin told us he did some config at his side so we can do that. ... (14 Replies)
Discussion started by: TheGunMan
14 Replies

5. UNIX for Dummies Questions & Answers

How to display only Owner and directory/sub directory names under particular root

hai, I am new to Unix, I have a requirement to display owner name , directory or sub directory name, who's owner name is not equal to "oasitqtc". (here "oasitqtc" is the owner of the directory or sub directory.) i have a command (below) which will display all folders and sub folders, but i... (6 Replies)
Discussion started by: gagan4599
6 Replies

6. OS X (Apple)

Logic of owner of directory or file

Would the owner as listed , be the one who made the directory in the first place. when any one could use chown in a script. I do not know where this directory came form or who made it. And am attempting to just find out more info on it. what could i use to find its origins and its why does it... (3 Replies)
Discussion started by: cowLips
3 Replies

7. Solaris

Changing file/directory owner

Hi , I want to change owner of files or folder from 23186 to dsadm, Present ------- -rw-r--r-- 1 23186 gdstage 10240 Oct 31 2007 BLTRS drwxrwxrwx 3 23186 gdstage 512 Sep 1 2010 sql Required as ----------- -rw-r--r-- 1 dsadm gdstage 10240 Oct 31 2007 BLTRS drwxrwxrwx 3 dsadm gdstage... (6 Replies)
Discussion started by: sridhardwh
6 Replies

8. UNIX for Dummies Questions & Answers

Creating a file where the owner and group is not root

Hi, I'm the root user on my computer, but I'm writing a script that does a lot of file handling. Every time I create a file or directory it automatically requires root privileges. Is there a way I can just create a file that the user can access without a password? For example in my script I... (20 Replies)
Discussion started by: jdilts
20 Replies

9. AIX

How to set owner and permission for files/directory in directory in this case?

Hi. My example: I have a filesystem /log. Everyday, log files are copied to /log. I'd like to set owner and permission for files and directories in /log like that chown -R log_adm /log/* chmod -R 544 /log/*It's OK, but just at that time. When a new log file or new directory is created in /log,... (8 Replies)
Discussion started by: bobochacha29
8 Replies

10. UNIX for Beginners Questions & Answers

UNIX command to display Owner,Group,Root and Subdirectories list

Hi Team, Am a newbie to Unix. As I would like to see the Server Name,Owner Name ( not numeric form), Group Name ( not numeric ID), ROOT path. I would like to send this list as an attachment to my personal mail. Can any one please help me out to to resolve this . Here is the sample result... (6 Replies)
Discussion started by: vasuvv
6 Replies
chroot(8)						      System Manager's Manual							 chroot(8)

NAME
chroot - Changes the root directory of a command SYNOPSIS
/usr/sbin/chroot directory command DESCRIPTION
Only root can use the chroot command. The chroot command changes the root directory from / to the specified directory when the command executes. (The command specified includes both the command name as well as any arguments.) Consequently, the root of any path (as indicated by the first / (slash) in the pathname) changes to directory and is always relative to the current root. Even if the chroot command is in effect, directory is relative to the current root of the running process. Several programs may not operate properly after chroot executes. You must ensure that all vital files are present in the new root file system and the relevant pathnames for the files map correctly in the new root file system. For example, the ls -l command fails to give user and group names if the new root file system does not have a copy of the /etc/passwd and /etc/group files. If the /etc/passwd and /etc/group files in the new root file system represent different user and group names, then the output from the ls -l command will be based on those names, not the ones for the system's own name database. Utilities that depend on description files produced by the ctab command may also fail if the required description files are not present in the new root file system. The chroot program uses the execv() function to invoke the specified command. As a consequence, the command specified must be an exe- cutable binary, not a shell script. Further, if the program requires indirect loading (for example, due to unresolved symbols requiring use of a shared library), then /sbin/loader as well as any files it requires (for example, shared libraries) must be present in the new root file system in the appropriate locations. EXAMPLES
To run a subshell with another file system as the root, enter a command similar to the following. Note in this example, the file system is on the /dev/disk/dsk13a device and is mounted to /mnt/dsk13a: chroot /mnt/dsk13a /sbin/sh The command shown in the previous example spec- ifies a change from the current root file system to the one mounted on /mnt/dsk13a while /sbin/sh (which itself is relative to the new root file system) executes. When /bin/sh executes, the original root file system is inaccessible. The file system mounted on /mnt/dsk13a must contain the standard directories of a root file system. In particular, the shell looks for commands in /sbin, /bin, and /usr/bin (among others) on the new root file system. Running the /sbin/sh command creates a subshell that runs as a separate process from the original shell. Press to exit the subshell and return to the original shell. This restores the environment of the original shell, including the meanings of the current directory (.) and the root directory (/). To run a command in another root file system and save the output on the initial root file system, enter a command similar to the following. Note in this example, the file system is on the /dev/disk/dsk13a device and is mounted to /mnt/dsk13a: chroot /mnt/dsk13a /bin/cc -E /u/bob/prog.c > prep.out The previous command runs the /bin/cc command with /mnt/dsk13a as the specified root file system. It compiles the /mnt/dsk13a/u/bob/prog.c file, reads the #include files from the /mnt/dsk13a/usr/include directory, and puts the compiled text in the prep.out file on the initial root file system. To create a file relative to the original root rather than the new one, use this syntax and enter: chroot directory command > file CAUTIONS
If special files in the new root have different major and minor device numbers than the initial root directory, it is possible to overwrite the file system. FILES
Specifies the command path. RELATED INFORMATION
Commands: cc(1), cpp(1), ls(1), sh(1) Functions: chdir(2), chroot(2) exec(2) delim off chroot(8)
All times are GMT -4. The time now is 08:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy