[Samba] cygwin and linux permissions?

mikee mikee at mikee.ath.cx
Fri Feb 9 17:12:35 GMT 2007


On Fri, 09 Feb 2007, mikee might have said:

> On Fri, 09 Feb 2007, Tim Boneko might have said:
> 
> > mikee schrieb:
> > 
> > >> On linux if I 'chmod 0600 $file' and then 'ls -l $file' on windows the
> > >> file permissions still show 0644. No change, like the file permissions ar
> > >> cached somewhere.
> > 
> > I had the very same problem during the last weeks. I kept trying and
> > testing and in the end i finally had working ACLs (hooray!), but this
> > didn't help. I created a file from Windows and set the permissions
> > really restrictive (like "0600", no access to anyone but me). OpenSSH
> > still complained.
> > 
> > My "solution": Putty. Runs perfectly now. Make sure to download the
> > puttygen packet if you want to use your existing ssh keys - the program
> > converts them to .ppk keys used in putty. Couldn't find any downsides
> > except for the key conversion.
> > 
> > http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
> 
> Thanks for the reply. Very restrictive permissions are what I need. I think
> the problem may be how cygwin is interpreting the windows/samba
> permissions. I have a user that is ssh'ing into windows to compile an
> application (they are developers). For this compiling the user's scripts
> (Makefiles actually I think) ssh back to unix servers to do something. As
> this is an automated script I need the ssh to go through without asking
> for a password. This works unix-to-unix, bot not windows-to-unix.

The solution (just found it) is add 'smbntsec' to the CYGWIN environment
variable. In cygwin I fixed by adding the code below to /etc/profile:

if [ "$CYGWIN" = '' ] ; then
        CYGWIN='tty ntsec smbntsec'
else
        CYGWIN="$CYGWIN tty ntsec smbntsec"
fi
export CYGWIN



More information about the samba mailing list