> Date: Wed, 17 Dec 2008 14:10:11 -0500
> To: cygwin@cygwin.com
> Subject: Re: Setup.exe (v2.609) Primary Group Problem
> 
> Corinna Vinschen wrote:
>>> Sorry for mailing twice, I never got a response. Is there a workaround for 
>>> getting the default install group to be what I want it to be?
>> 
>> I don't understand why a later chgrp doesn't provide what you need.
>> 
>> 
>> Corinna
>> 
> 
> That's what I'm doing now, but that means I have to chgrp every time packages 
> are installed or updated. One package isn't really a problem, but doing this 
> for many packages is. I have to know all file paths associated with every 
> installed/updated package and chgrp( -R) on all of them (which can be time 
> consuming). Even using -R sometimes won't do because some subdirectories' 
> groups would need to remain.
> 
> Would adding cmd line arguments for user/group to setup.exe be possible?
> 
> - Matt
 
I have used a script like the attached for years, after each time I run setup.
The extra x permissions do no harm and save a lot of work.
 
...Karl
_________________________________________________________________
Suspicious message? There’s an alert for that. 
http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_broad2_122008
#!/bin/bash
echo Setting up Cygwin mount points
cygwin-mount-points

echo "Globally changing ownership and permissions (except /dev /home /proc)"
cd /
chown administrators.none .
chmod 0755 .
for item in /* ; do
  if [ "$item" != /dev -a "$item" != /home -a "$item" != /proc ]; then
    if [ -d "$item" ]; then
      chmod -R 0755 "$item" &>/dev/null
      chown -R administrators.none "$item"
      chmod -R 0755 "$item"
    else
      chown administrators.none "$item"
      chmod 0755 "$item"
    fi
  fi
done

echo Fixing up /dev
chown administrators.none /dev
chmod 0755 /dev

echo Fixing up /etc
rm -f /etc/ssh_host_key
rm -f /etc/ssh_host_key.pub
rm -f /etc/ssh_host_dsa_key
rm -f /etc/ssh_host_dsa_key.pub
chmod 0600 /etc/ssh*
chown root.none /etc/ssh*

echo Fixing up /home
chown administrators.none /home
chmod 0755 /home

echo Fixing up /tmp
chmod 1777 /tmp
rm -fr /tmp/* &>/dev/null

echo Fixing up /var
chown root.none /var/empty
chmod 1777 /var/log
rm -f /var/log/agent*.log
chmod 644 /var/log/lastlog
chown root.none /var/log/lastlog
rm -f /var/log/OpenSSH.log
rm -f /var/run/ssh.pid
chmod 644 /var/run/utmp
chown root.none /var/run/utmp
chmod 1777 /var/tmp
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to