Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: "Michael Erdely" To: Subject: RE: ntsec environment variable Date: Thu, 26 Apr 2001 17:04:29 -0400 Message-ID: <0EA1EE20FBC6D411B98A00D0B77407A273D606@KRYPTONMAIL> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000 In-Reply-To: <000b01c0ce86$0346e050$c4332041@campbell> Importance: Normal I basically do this when I install a new Cygwin environment: #!/bin/sh ##begin script cd / echo Changing ownership of all files to admins.admins chown -R 544.544 . echo Removing write permissions for others and groups chmod -R og-w . echo Changing ownership of home directories for dir in /home/* ; do if [ -d $dir ]; then _USER=`basename $dir` _GROUP=`id -g $_USER` if [ $_GROUP ]; then echo Changing $dir to be owned by $_USER.$_GROUP chown -R $_USER.$_GROUP $dir fi fi done echo Fixing /tmp chmod -R a+rwxt /tmp echo Fixing /etc chmod -R 644 /etc/* chmod -R 755 /etc/postinstall /etc/setup if [ -d /etc/ssmtp ]; then chmod -R 755 /etc/ssmtp fi echo Fixing files in / chmod -R 644 /cygwin.ico /setup.log* echo Done. ##end script You may have to manually fix things like /etc/ssh_host*_key files if you're running ssh under a different user context than user 544 (administrator). Mike Erdely http://mike.erdelynet.com/ -----Original Message----- From: cygwin-owner AT sources DOT redhat DOT com [mailto:cygwin-owner AT sources DOT redhat DOT com] On Behalf Of Christopher Dale Campbell Sent: Thursday, April 26, 2001 3:21 PM To: Corinna Vinschen Subject: Re: ntsec environment variable -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Anyone have any suggestions? - ----- Original Message ----- From: "Corinna Vinschen" To: "Cygwin" Sent: Thursday, April 26, 2001 5:32 AM Subject: Re: ntsec environment variable > On Thu, Apr 26, 2001 at 04:51:48AM -0400, Christopher Dale Campbell > wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > - --SNIP-- > > > > > > And chmod is ok to use for all users as long as they have the > > > permission to do so. But my instruction was buggy. Ok, *sic*, try > > > that: > > > > > > chmod 755 . > > > chmod -R 755 bin > > > find learn_c src -type d | xargs chmod 755 > > > find learn_c src tmp -type f | xargs chmod 644 > > > > > > Corinna > > > > > - --SNIP-- > > > > Will this also work for / ? As in, as 'administrator', could I do > > a: > > > > find / -type d |xargs chmod 755 > > find / -type f |xargs chmod 644 > > > > Would that give most things the correct permissions? Because after > > a new install, and using the 'ntsec' env. var. all files are 777 > > (-rwxrwxrwx). > > That would be somewhat dangerous since all files which are executables > need the x bit set. And that are not only .exe files but also .dll > files and all shell scripts. So don't do this. Many small steps are > better here. > > Corinna > > -- > Corinna Vinschen Please, send mails regarding > Cygwin to Cygwin Developer > mailto:cygwin AT cygwin DOT com Red Hat, Inc. > > -- > Want to unsubscribe from this list? > Check out: http://cygwin.com/ml/#unsubscribe-simple -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 7.0.3 for non-commercial use iQA/AwUBOuh1EoXnWfGgRqP+EQIFJwCg+klmq1Ia4QcqYUzgCE3uNSMjURAAnAuJ QyOXRaSECyF+IJaCsvNtL/Ld =mEeP -----END PGP SIGNATURE----- -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple