|
-
July 10th, 2003, 10:56 AM
#1
Basic *nix question?
Hi guys/girls,
I've been using Solaris version 9 for 4 days and I've been play around with it. And I am totally noob as Solaris user. Ok this is really basic command but I am a bit confused:
Code:
$ ls -la /user
drwxr-xr-x 3 root other 512 jul 10 12.57 .
drwxr-xr-x 26 root root 512 jul 10 12.57 ..
drwxr-xr-x 5 annya staff 512 jul 10 12.59
As you can see .. there are "two roots" and permission for root=annya ( annya not in wheel group), so my question is why two roots? and why annya have same permission as root?
And BTW I don't have this command problem on BSD and Linux..
Thanks for your information
Cheerss
annya
Not an image or image does not exist!
Not an image or image does not exist!
-
July 10th, 2003, 11:25 AM
#2
Hi Annya...
Code:
drwxrwxrwx
|--- ---
| | --- |
| | | --- other
| | ------ group
| --------- user/owner
----------- see below
first character:
d = directory
l = symbolic link
b = special file
c = character special file
p = fifo (or `named pipe') special file
s = AF_UNIX address family socket
- = ordinary file
permission:
r = read
w = write
x = execute, or change directory if it's a directory
So apparently there is a user named root, a user named annya, a group named root, a group named other, and a group named staff.
drwxr-xr-x 3 root other 512 jul 10 12.57 .
-> for the current directory, user root has rwx permission, group other has rx permission, any other users/groups have rx permission
drwxr-xr-x 26 root root 512 jul 10 12.57 ..
-> for the parent directory, user root has rwx permission, group root has rx permission, any other users/groups have rx permission
drwxr-xr-x 5 annya staff 512 jul 10 12.59 xx
-> for this xx directory, user annya has rwx permission, group staff has rx permission, any other users/groups have rx permission
Gampang kan? Hope this helps.
Peace always,
<jdenny>
Always listen to experts. They\'ll tell you what can\'t be done and why. Then go and do it. -- Robert Heinlein
I\'m basically a very lazy person who likes to get credit for things other people actually do. -- Linus Torvalds
-
July 10th, 2003, 11:36 AM
#3
Originally posted here by jdenny
Hi Annya...
Code:
drwxrwxrwx
|--- ---
| | --- |
| | | --- other
| | ------ group
| --------- user/owner
----------- see below
first character:
d = directory
l = symbolic link
b = special file
c = character special file
p = fifo (or `named pipe') special file
s = AF_UNIX address family socket
- = ordinary file
permission:
r = read
w = write
x = execute, or change directory if it's a directory
So apparently there is a user named root, a user named annya, a group named root, a group named other, and a group named staff.
drwxr-xr-x 3 root other 512 jul 10 12.57 .
-> for the current directory, user root has rwx permission, group other has rx permission, any other users/groups have rx permission
drwxr-xr-x 26 root root 512 jul 10 12.57 ..
-> for the parent directory, user root has rwx permission, group root has rx permission, any other users/groups have rx permission
drwxr-xr-x 5 annya staff 512 jul 10 12.59 xx
-> for this xx directory, user annya has rwx permission, group staff has rx permission, any other users/groups have rx permission
Gampang kan? Hope this helps.
Peace always,
<jdenny>
OK, but why annya have same permission as root?? (annya not in wheel group)
Thanks denny you remind me of my Granny she is from Bali
Not an image or image does not exist!
Not an image or image does not exist!
-
July 10th, 2003, 11:53 AM
#4
No, annya doesn't have the same permission as root.
The two root-owned directories in /user are "." and ".."
"." is the current directory, hence points at /user
".." is the parent directory, hence points at / (the root directory of the system).
These directories are expected to be owned by root.
If you don't want to be confused in this manner, try ls -l instead of ls -la
ls -la shows "hidden" files (ones which start with a dot). This includes the normally hidden "." and ".."
Although it's useful to know there there, we don't normally care about having them in directory listings.
-
July 10th, 2003, 12:27 PM
#5
Originally posted here by slarty
No, annya doesn't have the same permission as root.
The two root-owned directories in /user are "." and ".."
"." is the current directory, hence points at /user
".." is the parent directory, hence points at / (the root directory of the system).
These directories are expected to be owned by root.
If you don't want to be confused in this manner, try ls -l instead of ls -la
ls -la shows "hidden" files (ones which start with a dot). This includes the normally hidden "." and ".."
Although it's useful to know there there, we don't normally care about having them in directory listings.
Thanks slarty that's make sense..
Code:
$ ls -l1 /users
drwxr-xr-x 5 annya staff 51 jul 10 16.46 annya
but I tried to use different user (annya1) and this time I put in wheel group and still have same permission, or maybe I did something wrong here:
Code:
$ ls -l1 /users
drwxr-xr-x 5 annya1 staff 51 jul 10 16.59 annya
I think something went wrong here ( I might made mistake)..I am very sure I checked 3 times when I use "admintool" on solaris to add username ,which one wheel and which one not...
Thanks guys and I am still play around with it..
cheerrs
Not an image or image does not exist!
Not an image or image does not exist!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|