how to find a configuration option value on solaris?

how to find a configuration option value on solaris?

Post by Nasser Abba » Thu, 18 Jul 1996 04:00:00



hi,

what is the recommended way to find if a certain option is set
on a system? for example, I wanted to change the ownership of
file that I own fully and legally, I wanted to change the owner to
another user, but the system was not letting me do that saying that
I am not the owner, which is offcourse is a big lie, since I am
definitly is the owner, since I can see my name right there on
the file when I do ls -l.

So, I looked at man chown to try to figure this problem out, and
saw this:

     The   operating   system   has   a   configuration    option
     {_POSIX_CHOWN_RESTRICTED},  to  restrict  ownership changes.
     When this option is in effect  the  owner  of  the  file  is
     prevented  from changing the owner ID of the file.  Only the
     super-user can arbitrarily change  owner  IDs  whether  this
     option is in effect or not.

so, I said to myself, then may be this option is set on my
workstation (solaris 2.5).

But there seems to be a number of configurations files one can look
at and admintools , how can a non-super user know the value of these
options? and what options as currently set on the system? or do I
have to become  a super person to find that out?

thanks
Nasser
please also send me email since our news reader is slow
and might take a weeks befor I can read any responses.
--
Nasser Abbasi. C/C++/Ada Solaris. GeneAssist - A client/server application
for Nucleic acid and protein sequence search and analysis.

MSEE(control), MSCS, MSCE, FM (Fide Chess Master).

 
 
 

how to find a configuration option value on solaris?

Post by Richard L. Hamilto » Thu, 18 Jul 1996 04:00:00


I don't see that particular tunable parameter in the documentation,
although many of the others are.

You need to be root to change any of them.

To turn off _POSIX_CHOWN_RESTRICTED without rebooting, as root,
do the following:

# adb -k -w /dev/ksyms /dev/mem
rstchown/W 0
(reports old value, default is 1 i.e. enabled)
$q

To make this permanent, add the line:

set rstchown=0

to /etc/system

To undo those changes, take the line out of /etc/system and
execute the same adb command,except that
rstchown/W 0
should be
rstchown/W 1
to re-enable _POSIX_CHOWN_RESTRICTED.

Doing the latter and rebooting is *much* safer than using
adb in write mode on the running kernel image, especially with
a multi-threaded kernel where you may be changing something that's
being depended on to have it's value only changed by kernel code.

I just tried turning off _POSIX_CHOWN_RESTRICTED, changing ownership
(as myself rather than as root), turning it on, and repeating the
test.  The results were what I expected; giving away a file I own
works with rstchown = 0 (_POSIX_CHOWN_RESTRICTED = false), and fails
with rstchown = 1.

Volume II of the System Adminstration Guide describes a number
of tunable parameters, but not this one as far as I know.

Also, sysdef -i output is unaffected by the setting of rstchown.

All of the above was done with SPARC Solaris 2.5 on an IPC.  Your
results may vary.

In my not so humble opinion (IMNSHO), restricted chown ought to be
a mount option rather than a system-wide parameter, not unreasonable
since the value of this is reported with pathconf() rather than
sysconf().


> hi,

> what is the recommended way to find if a certain option is set
> on a system? for example, I wanted to change the ownership of
> file that I own fully and legally, I wanted to change the owner to
> another user, but the system was not letting me do that saying that
> I am not the owner, which is offcourse is a big lie, since I am
> definitly is the owner, since I can see my name right there on
> the file when I do ls -l.

> So, I looked at man chown to try to figure this problem out, and
> saw this:

>      The   operating   system   has   a   configuration    option
>      {_POSIX_CHOWN_RESTRICTED},  to  restrict  ownership changes.
>      When this option is in effect  the  owner  of  the  file  is
>      prevented  from changing the owner ID of the file.  Only the
>      super-user can arbitrarily change  owner  IDs  whether  this
>      option is in effect or not.

> so, I said to myself, then may be this option is set on my
> workstation (solaris 2.5).

> But there seems to be a number of configurations files one can look
> at and admintools , how can a non-super user know the value of these
> options? and what options as currently set on the system? or do I
> have to become  a super person to find that out?

--
ftp> get |fortune
377 I/O error: smart remark generator failed



 
 
 

how to find a configuration option value on solaris?

Post by Zakie Mashia » Sat, 20 Jul 1996 04:00:00



> hi,

> what is the recommended way to find if a certain option is set
> on a system? for example, I wanted to change the ownership of
> file that I own fully and legally, I wanted to change the owner to
> another user, but the system was not letting me do that saying that
> I am not the owner, which is offcourse is a big lie, since I am
> definitly is the owner, since I can see my name right there on
> the file when I do ls -l.

> So, I looked at man chown to try to figure this problem out, and
> saw this:

>      The   operating   system   has   a   configuration    option
>      {_POSIX_CHOWN_RESTRICTED},  to  restrict  ownership changes.
>      When this option is in effect  the  owner  of  the  file  is
>      prevented  from changing the owner ID of the file.  Only the
>      super-user can arbitrarily change  owner  IDs  whether  this
>      option is in effect or not.

> so, I said to myself, then may be this option is set on my
> workstation (solaris 2.5).

> But there seems to be a number of configurations files one can look
> at and admintools , how can a non-super user know the value of these
> options? and what options as currently set on the system? or do I
> have to become  a super person to find that out?

> thanks
> Nasser
> please also send me email since our news reader is slow
> and might take a weeks befor I can read any responses.
> --
> Nasser Abbasi. C/C++/Ada Solaris. GeneAssist - A client/server application
> for Nucleic acid and protein sequence search and analysis.

> MSEE(control), MSCS, MSCE, FM (Fide Chess Master).

This is one of the confusing issues in UNIX.
Is it possible that the file is in a directory to which you
DONT have write permissions? I guess this is the case...
--
------------------------------------------------------------------

Tel: 972-3-6487415 Fax: 972-3-6487414         http://www.memco.com
------------------------------------------------------------------
 
 
 

1. Can't find some options in kernel 2.2.14 configuration

I have SuSE 6.4 with kernel 2.2.14 and tried to
compile a kernel for use as a firewall.
Therefore, I wanted to activate "IP: Always
defragment" and "IP: Drop source routed frames"
and ensure that "Fast Switching" is off.
However, I couldn't find these options in the
kernel configuration. I tried 'make config'
and 'make menuconfig' with both the original
kernel sources and SuSE's modified sources.


Thanks
Sebastian Flothow

Sent via Deja.com http://www.deja.com/
Before you buy.

2. Finding out the GC algorithm

3. ksh: finding the value of a value in a for loop

4. PPPD and chat problems -- Help Please!

5. Find numeric value in xml file, recalculate, and replace old value

6. system() call with csh?

7. Irritating animated icons in Konqueror

8. Has anybody the C sources for Black Scholes option value calculation?

9. Sound Config options value. What does it mean?

10. 6/6: debug option for pre-wrap jiffies value

11. automounter -Dvariable=Value option?

12. Obtaining Kernel 'option' values