Good afternoon, I hope that someone can make a suggestion or two as what my issues are and how to solve them, or suggest the correct group to post the questions to.
I have successfully installed Oracle Solaris 11.1 (x86/64-bit) installation on Oracle VirtualBox. Now, I would like to install Oracle 11gR2 in my Oracle Solaris 11.1 environment. At the moment, I am completing the pre-installation instructions. Having signed on as the root user, I created the oracle user and the oinstall group. Further on, the instructions call for the creation of two directories, /u01/app/oracle and /u02/oradata, which I created without error, both directories being owned by root. Next, the instructions call for changing the owner and group to the oracle user and the oinstall group, as follows:
My specific issue is that after performing the chown command, I do an ls -l and see that the two directories appear to be still owned by root (the group is root as well). Even though I am performing the chown command as root, the chown command does not appear to change the owner and group of the two directories to oracle:oinstall
After a suggestion was made to me to execute an ls -ld (as root) on the root directory, I got the following results:
I was surprised to say the least, as when I executed an ls -l from the root directory as root, I got the following results:
I exited from the root role and back to my user account, and then executed an ls -ld from the root directory and got the same results as above, showing the oracle and oinstall as the owner and group, respectively. I then executed an ls -l from the root directory and the results showed root and root as the owner and group. Can anyone enlighten me on what the difference is between ls -l and ls -ld that would show the owner/group for ls -l as root:root and the owner/group for ls -ld as oracle:oinstall? Is there any way to tell whether root:root is the owner:group of the two directories or is oracle:oinstall the owner:group of the two directories?
I appreciate any suggestions that one can make, many thanks in advance for your assistance.
Last edited by Scrutinizer; 02-23-2013 at 02:18 AM..
Reason: code tags
The ls -l is showing you the information about the contents of the directory, ls -ld shows you information about the directory itself.
Play around with it on some other directories that have subdirectoires and you see what I mean.
I was surprised to say the least, as when I executed an ls -l from the root directory as root, I got the following results:
There should be no cause for surprise. If you ask chown to recursively change the ownership of a directory, /a/b/c, chown will change the ownership of that named directory and any files and directories below it, such as /a/b/c/d and a/b/c/d/e. It will not change the ownership of files or directories above /a/b/c, such as /a and /a/b.
What you've demonstrated above is equivalent to using chown on /a/b/c and then using ls to inspect the ownership of /a. /a will not be affected.
I think your problem is more one of understanding, not of not achieving what you want to do. I have quoted the relevant part:
Quote:
Originally Posted by PWN
I was surprised to say the least, as when I executed an ls -l from the root directory as root, I got the following results:
The command "ls" shows information about files and/or directories. That means, your first command showed information about two directories you specified as arguments to the command: /u01/app/oracle and /u02/oradata.
In the second line you specified no such operand. In this case "ls" implies the current directory (also called PWD) as operand. As suggested by your prompt this was probably / and by issuing "ls" without any argument you did effectively this:
Of course, / has different ownerships than /u01/app/oracle and /u02/oradata, but this is to be expected.
To confirm this, try the following:
and you will see the corresponding output to ls -ld /u01/app/oracle (similar for the other directory). The reason is simply that by changing your current directory with the "cd" (change directory) command first you changed the default value for "ls" in absence of any directory name provided on the command line.
Hi Alister, Bakunin: thanks very much for your replies. As I read each reply, the light went on and I totally agree with what each of you said.
Alister, allow me to summarize your answer and how I was able to solve my problem. Assuming I have logged in and su - root, and have cd to the root directory, I execute the chown -R oracleinstall on /u01/app/oracle. This in effect is the same as the example in your answer, to chown -R /a/b/c. What I have in fact requested is to recursively change the owner & group on on directory "c" and below, i.e. changing the owner & group for the "oracle" directory. However, this leaves root root as the owner & group of the u01 and app directories. What I really wanted to achieve is to change the owner & group of the u01, app, and oracle directories to oracleinstall. To do this, I executed the chown -R u01 and and low & behold, after executing an ls -l, the owner & group of u01 is now oracleinstall. I have done the same for the u02 directory.
Again, I appreciate the time you took to read my question and summarize what was a lack of understanding on my part. Thanks very much!
Hi,
Can anyone please explain a little about df command. I have following question:
Following example is showing % used as 4 where as total free blocks are 15.46 out of 16.00 MB blocks.
df -m /test
Filesystem MBblocks Free %Used Iused %Iused ... (5 Replies)
Hey my friend was asking me if i knew a way to cout how many different words in a file. I told him no not off hand, but i was thinking about it, and i started to wonder also. I imagine this is probably pretty simple im just missing something, I keep confusing my self with how you would compair and... (16 Replies)
hallo, ik heb hier een vraagje. hoeveel gebruikers kunnen er op 1 unix systeem. hopelijk antwoorden golle nu want ik moet da vinde voor school en die leerkracht zaagt. :p
groetjes eu wacht wa was mijne nick ah ja vraagje
groetjes vraagje
ik kan geen engels dus antwoord liever in het... (1 Reply)
Hello
if I like to move file from defined directories system to new directory that not contained any directories system structure .
But I like to create the same file system structure as source directory for example :
I have 2 directories: foo1 and foo2
foo1 have directories and foo2 have... (2 Replies)
Now that I have getch() to work, I have yet another problem. BTW, thank you for answering these questions, I do ask a lot, only because I am eager to know, what is a board used for anyways :)
Ok, he's the problem...
#include iostream.h
#include conio.h
int main()
{
char movement;
... (2 Replies)