LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 02-08-2006, 10:26 AM   #1
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Rep: Reputation: 31
Solaris 9: group won't be listed


I have 2 solaris: 9 and 10.
I noticed that in Solaris 9, you get get the owner's group when you do ls -l. Is is possible to have it appear?
To be clear, under solaris 9, I have:
Code:
drwxr-s---  10 bob      512 Apr 30  2000 Projects
under Solaris 10, I have:
Code:
drwxr-s---  10 bob http         512 Apr 30  2000 Projects
My Problem is that I just did a rsync between the 2 solaris. This directory "Projects" is on apache. When I try to read the files in the directory Projects (that has setuid permissions as you can see) from internet, I get the message "You don't have permission to access /Projects/ on this server." But the same files are readable on the first server.

So I guess that the problem has to do with the group-ID.

Thanks for any help.
 
Old 02-08-2006, 10:40 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Hopefully, "ls -l" behaves the same whatever Solaris version you are running.

Can you double check, and run on both platforms:
Code:
uname -a
/bin/ls -l /etc/hosts
/bin/ls -ln /etc/hosts
 
Old 02-08-2006, 11:13 AM   #3
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by jlliagre
Hopefully, "ls -l" behaves the same whatever Solaris version you are running.

Can you double check, and run on both platforms:
Code:
uname -a
/bin/ls -l /etc/hosts
/bin/ls -ln /etc/hosts
on solaris 9, I have

Code:
[sunsite@root:/servers/http/docs]# /bin/ls -l /etc/hosts
lrwxrwxrwx   1 root     root          12 Feb 13  2003 /etc/hosts -> ./inet/hosts
[sunsite@root:/servers/http/docs]# /bin/ls -ln /etc/hosts
lrwxrwxrwx   1 0        0             12 Feb 13  2003 /etc/hosts -> ./inet/hosts
[sunsite@root:/servers/http/docs]# uname -a
SunOS sun1 5.9 Generic_112233-04 sun4u sparc SUNW,Ultra-Enterprise
on solaris 10:
Code:
# /bin/ls -l /etc/hosts
-rw-r--r--   1 root     root          87 Jan 27 14:15 /etc/hosts
# /bin/ls -ln /etc/hosts
-rw-r--r--   1 0        0             87 Jan 27 14:15 /etc/hosts
# uname -a
SunOS sun2 5.10 Generic sun4u sparc SUNW,Sun-Fire-V240
I see big differences in hosts... but can't interpret them...
 
Old 02-08-2006, 11:42 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Two comments:
- The group problem your were complaining of doesn't show up.
- Your Solaris 10 installation is broken. /etc/hosts has to be a symbolic link.
 
Old 02-08-2006, 11:52 AM   #5
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by jlliagre
- The group problem your were complaining of doesn't show up.
But the fact is: doing ls -l shows me only owner without the group (ok, except for the hosts file). Is it normal in solaris 9, or do I have a problem?

Quote:
Originally Posted by jlliagre
- Your Solaris 10 installation is broken. /etc/hosts has to be a symbolic link.
How come?! I just started with this server and almost did nothing with it. How may I correct this, and how may I understand how this could happened?

Thanks for your help.
 
Old 02-08-2006, 12:28 PM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Originally Posted by xpucto
But the fact is: doing ls -l shows me only owner without the group (ok, except for the hosts file). Is it normal in solaris 9, or do I have a problem?
You have a problem.
What shows "ls -ln" on the very same file ?
It could be you have a group whose name is space i.e. " " ...

Quote:
How come?! I just started with this server and almost did nothing with it.
Well you or someone else removed /etc/hosts, then create it again as a plain file, not a casual behaviour.
Quote:
How may I correct this, and how may I understand how this could happened?
Perhaps by searching who was logged in on Jan 27 at 14:15 ...
 
Old 02-08-2006, 12:46 PM   #7
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
Thanks for your quick reply!
On Solaris 9, ls -ln:
Code:
drwxr-s---  10 bob      512 Apr 30  2000 Projects
so it shows the same thing as with ln -l! UID and GUI are not shown.

on solaris 10 the ls -ln gives:
Code:
drwxr-s---  10 102      100          512 Apr 30  2000 Projects
102 is Bob, and 100 exists in /etc/group as http.

What do you think about all this?!

Thanks again for your assistance.

Last edited by xpucto; 02-08-2006 at 12:48 PM.
 
Old 02-08-2006, 02:04 PM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
try, on S9:
Quote:
type ls
/bin/ls -ln
 
Old 02-09-2006, 03:00 AM   #9
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
Excellent! Thanks for your help, I can see a bit more clearly:
Code:
 type ls
ls is hashed (/usr/ucb/ls)
on Solaris 10, I get
Code:
type ls
ls is hashed (/usr/bin/ls)
Is it the explanation?
when I do
Quote:
/usr/bin/ls -l
or
Quote:
/bin/ls -l
then I get
Quote:
drwxr-s--- 10 bob http 512 Apr 30 2000 Projects
Great! I guess I just have to change the alias of ls?

So the rsync respected the permissions and the group http is actually correct. I guess the question why the setgid doesn't work belongs to another forum.

I really thank you for your help.
 
Old 02-09-2006, 03:50 AM   #10
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
It's not an alias problem, but a PATH one.

My advice would be to remove the /usr/ucb from the PATH, or at least to put it at the end of it, not before /usr/bin.
 
Old 02-09-2006, 05:51 AM   #11
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
Thanks a lot!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Listed partition in cfdisk, but not listed in /dev? Erik_the_Red Linux - Newbie 7 08-05-2005 11:44 PM
well, there's info written inside /etc/group. accidentally del /etc/group in RedHat9 karmakid Red Hat 1 07-27-2005 10:27 PM
autofs group problem linux-solaris pao Linux - Networking 1 10-22-2004 06:48 AM
Group Admin, Group Root, or God over Group crickett Linux - General 5 07-12-2004 04:01 PM
[alert] (22) Invalid argument : setgid : unable to set group id to Group 4294967295 Niraj Linux - Networking 1 12-13-2001 06:58 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 08:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration