This is the mail archive of the cygwin@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]

possible permissions bug (was: inetd / ftpd file permissions)


ok, i have searched the whole web (including cygwin ML) and i couldnt find
anything specific to cygwin regarding the permissions of the files
transferred via ftp. maybe i'm just a lousy searcher but if you havent
replied because the solution was easy to find, PLEASE tell me where to RTFM
because my accounting data is not being transferred for 2 days!! :-)

let me first start by telling you what i've done. i found *lots* of
solutions of for this problem for other unices. the most interesting ones
where: 

- set the umask in /etc/default/ftpd. this directory and file do not exist
by default under cygwin. created it, stoped & started the inetd but it didnt
affect ftpd at all. coulnd find any references to it in the ML. 

- set the user's umask in the login.conf file. there is no login.conf file
and i couldnt find any references to it in the ML. 

- add -uXXX to the parameters of the ftpd in inetd.conf. i dont really get
this one. the -u option is not on the ftpd man page but it seems to affect
the behaviour of the daemon; with -u666 all my files are now with --- to
everyone. 

(see http://www.tek-tips.com/gviewthread.cfm/lev2/3/lev3/20/pid/80/qid/75666
 and http://www.freebsddiary.org/ftp-anonymous.php)

now the interesting part. i thought i had made a mistake with the
permissions, so i tested it with 
chmod under linux

$chmod 666 test.txt 

and the result was rw- to everyone, as i wanted. i then logged on locally to
the server running cygwin and did the exact same thing and the result was
r-x to everyone! i tried the same command telnetting to the cygwin box and
it works fine. looking for "chmod problems", "permissions not working", etc
in the mailinglist gives me lots of noise but nothing in concrete. 

my question is: are there any permission bugs running cygwin on an NT4.0
box? if not, is it not possible to change the default permissions of a file
transferred by ftp? 

thanks for your time.

marco



> -----Original Message-----
> From:	Craveiro, Marco 
> Sent:	30 April 2002 07:52
> To:	'cygwin@cygwin.com'
> Subject:	inetd / ftpd file permissions
> 
> hello cygwinners,
> 
> i have a little problem again (bad week). i started using cygwin's ftp
> server instead of NT's. its working fine but the default permissions for
> the
> files are different and they are causing problems with some of my scripts.
> i
> searched the web and found the exact answer for this problem: a wrapper
> script (but not specifically for cygwin). i then
> 
> 1) installed the wrapper under /usr/sbin/in.ftpd-wrapper.sh and chmoded it
> to 755. contents:
> 
> #!/bin/sh
> umask 666
> 
> exec /usr/sbin/in.ftpd
> 
> 2) changed my /etc/inetd.conf to 
> 
> ftp     stream  tcp     nowait  root    /usr/sbin/in.ftpd-wrapper.sh
> in.ftpd-wrapper.sh      
> 
> 3)  stopped and started the service.
> 
> unfortunately, i still get my files transferred with 022 permissions. i
> couldn't find anything in cygwin's mailing list about this. is this the
> right way to do it for cygwin? 
> 
> thanks for your time.
> 
> marco

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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