This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Base-files 3.4-1: Problems for users with Non-Admin. priv. (atn:Corinna)


On Mon, 16 May 2005, John Morrison wrote:

> On Sun, May 15, 2005 9:38 pm, Angelo Graziosi said:
> >
> > When loging as user without admn. priv.
> > (e.g.: owner= Graziosi, group= Users)
> > the standard bash shell (cygwin.bat) says:
> >
> >    chmod: changing permissions of `/tmp': Permission denied
> >
> > This is caused by
> >
> > if [ -d "/tmp" ]; then
> > 	chmod 1777 /tmp
> > fi
> >
> > in /etc/profile.
> >
> > It assign the permission "t" to /tmp but this was already a problem
> > with xorg-x11-xwin-6.8.2.0-1 and org-x11-xwin-gl-6.8.2.0-1.
> > The next, 6.8.2.0-2, was released exactly to fix that problem.
> > The solution was to not assign the "t" permission to /tmp and
> > to whatever it contans!
> >
> > angelo.
>
> Corinna, this was a change you asked for... what would you like me to do?
> <http://cygwin.com/ml/cygwin-apps/2005-04/msg00206.html>

How about simply redirecting stderr to /dev/null?  You can also improve
the test, e.g.,

if [ -d "/tmp" -a ! -k "/tmp" ]; then
	chmod 1777 /tmp 2>/dev/null
fi

BTW, IMO, if the first test fails (i.e., /tmp is not a directory), so many
things will be screwed up that we might as well assume that it succeeds.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]