Subject: RE: FVWM: Permissions error...

From: "Nagle, Adrian" <[email-masked]>
Date: Mon, 4 Jan 1999 11:06:21 -0700

Okay, okay, I know I screwed up.  I didn't know of a better approach and
didn't realize the consequences (the problem is bigger because I
accidentally did "chmod -R 755 *" in the /usr directory as well :(  ).

> From:	Dominik Vogt [SMTP:[email-masked]]
> On Mon, Jan 04, 1999 at 07:25:50AM -0700, Nagle, Adrian wrote:
> > I've recently installed the latest XFREE86 server.  I think I've finally
> > have everything installed with two problems left.
> > 
> > Everything was installed with only root permissions so the server was
> > working fine in root, but not in my user account.  So I "chmod -R 755 *"
> in
> > the /usr/X11R6 directory.
> 
> Oh my god, did you really do that? That means you have nuked the
> permissions of *all* files and directories below /usr/X11R6 and
> that are quite a lot. Just to give you an idea: On my system
> there are 10808 files/directories there that don't have 755
> 
> Every file has its own permissions. You can't just put the same
> permissions on every file. Or do you think setting the executable
> bit would make a picture run like a program? You'll probably have
> screwed up a few SUID or SGID bits.
> 
There appeared to be many directories with only root access that needed
global access for other accounts to be able to run.  I though "chmod -R 755
*" would take care of that.  I was obviously wrong.  The problem is actually
worse, as I first accidentally did that command in /usr.  Real BIG oops.
And no, I wasn't trying to execute picture files.  :)

> > Was "chmod -R 755 *" the wrong approach?
> 
> Absolutely.
> 
Okay, what's the correct approach?  There seam to be many files that need
the permissions changed (directories and executables, etc.).  Is there a
file list or a better installation procedure?  I can easily re-install X,
but I want to know how to change to permissions to the appropriate files,
whichever they are.

> > The other problem is what the default server is.  I want to use the
> > accelerated server at 1280x1024 resolution, but I can't find out how to
> do
> > that.  I'm guessing it's using the VGA server at a very large
> resolution?
> > But I have /usr/X11R6/X -> XFREE86_SVGA for my S3 ViRGE/VX card.
> ctrl-alt-+
> > doesn't do anything either.
> 
> You need to run xf86config or perhaps some other fancy tool that
> came with your distribution. There you can specify all the resolutions
> you want to use.
> 
I have all of the resolutions defined, but how do I get to those
resolutions?  I was planning on copying and pasting the accelerated "Screen"
sections first so see if the order matters.

Thanks for your help.

Adrian

--
Visit the official FVWM web page at <URL: http://fvwm.math.uh.edu/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked] (Paul D. Smith)
Date: 04 Jan 1999 13:22:59 -0500

>> Absolutely.

  na> Okay, what's the correct approach?  There seam to be many files
  na> that need the permissions changed (directories and executables,
  na> etc.).  Is there a file list or a better installation procedure?
  na> I can easily re-install X, but I want to know how to change to
  na> permissions to the appropriate files, whichever they are.

First, note that this mailing list is not really the appropriate place
for these problems: this is for discussion of the fvwm window manager,
which is generic and runs on any version of UNIX and X and has nothing
to do with how to start the XFree86 server or the permissions of its
files.  You should probably continue this on the comp.os.linux.x or
comp.windows.x.i386unix newsgroups.

Second, all the permissions should be correct as-is on an installation.
Can you provide an example of permissions that you felt were incorrect,
and why you thought so (what didn't work that made you suspect a problem
with permissions)?  Whenever I install things they always have the right
permissions out-of-the-box.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
Visit the official FVWM web page at <URL: http://fvwm.math.uh.edu/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 4 Jan 1999 19:54:23 +0100

> accidentally did "chmod -R 755 *" in the /usr directory as well :(  ).

All right, always willing to help the rueful sinner ;-)

> worse, as I first accidentally did that command in /usr.  Real BIG oops.

One hint in general: it pays off to see what your commands *would* do
before really doing something recursive. If you have zsh, you could have
hit tab right after typing the asterisk 'chmod -R 755 *<TAB>' and all
the possible file names would have been completed on the command line.
You had seen your error fast here. If you want to act on directories,
use '*(/)' instead of '*' (zsh only again). Or use a for loop:

  # for i in `find . -type d`; do echo chmod 755 $i; done

If you like what you see, remove the 'echo' and go on. This
doesn't cost you much but can help immensely.

> but I want to know how to change to permissions to the appropriate files,

First of all your main problem is that /usr/X11R6 does not just contain
the X server but many applications too, so no simple recursive approach
will work. Basically it is no problem that some executables are root-only
since the X server runs as root (chmod 4755 /usr/X11R6/bin/Xwrapper).
Without ever having installed an X server on my own I suggest
trying these, first to last (assuming that you are running a Linux box):

1) See if your distribution can set the permissions for you. This may
   not be obvious and you may have to read some documentation on this
   topic (I can do it with my SuSE distribution).

2) Try to get the latest XFree86 package from your distributor. This
   should have the correct permissions set and can usually be
   downloaded for free.

3) Read the installation instructions carefully. There must be some
   hint how to properly install the X server so that everybody can
   use it.

> sections first so see if the order matters.

Well, I never understood how these screen sections have to look,
but perhaps this excerpt from my XF86config helps you:

----
Section "Device"
  Identifier    "Primary Card"
  VendorName    "!!! GENERIC SERVER SELECTION !!!"
  BoardName     "S3"
  Chipset       "s3_generic"
  Ramdac        "s3_trio64"
  ClockChip     "s3_trio64"
  VideoRam      2048
  DacSpeed      135 135 135 135
EndSection

Section "Screen"
  Driver        "accel"
  Device        "Primary Card"
  Monitor       "Primary Monitor"
  DefaultColorDepth     16
  SubSection "Display"
    Depth       8
    Modes       "1280x1024" "1024x768" "800x600" "640x480"
  EndSubSection
  SubSection "Display"
    Depth       16
    Modes       "1024x768" "800x600" "640x480"
  EndSubSection
  SubSection "Display"
    Depth       24
    Modes       "800x600"
  EndSubSection
  SubSection "Display"
    Depth       32
    Modes       "800x600"
  EndSubSection
EndSection

Section "Screen"
  Driver        "SVGA"
  Device        "Primary Card"
  Monitor       "Primary Monitor"
  DefaultColorDepth     16
  SubSection "Display"
    Depth       8
     Modes       "1280x1024" "1024x768" "800x600" "640x480"
  EndSubSection
  SubSection "Display"
    Depth       16
    Modes       "1024x768" "800x600" "640x480"
  EndSubSection
  SubSection "Display"
    Depth       24
    Modes       "800x600"
  EndSubSection
  SubSection "Display"
    Depth       32
    Modes       "800x600"
  EndSubSection
EndSection
----

I don't think the order matters but make sure that you are really
running the X server spcified in the 'Device' line. Try the
manpage for XF86Config. It describes the file format.

Bye

Dominik

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]