X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:references:to:from:reply-to:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=t2i8Je514Hz7AeB+ YUYHLgEcy98DZNaz5LzrdeIDgTCTOL0h4Z7nqHfye/FS0ZFdtTwDSaSgS6efomJD wWT7pQAwHyu16qVzkGKKQYUOQ9FpKpEVWXnBLCYiXYauSJ2ZlLzB5Qa3StgDfEDG dudnb7HLzXGOetNVfwflcbtqQrE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:references:to:from:reply-to:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=E+t3yLe/6IhH58TAHcJP1O nf9fo=; b=qdH2p1P6wPkudA9gi159gy3vCyjlaj60UoK62GjT/lujGNE4wyPYxR eJFAmHELN08DkCMap8SNgr3uemP4yPZS/Y5WnY9vijlJ8n13oqGwQ0/VlGoioICN wF+YCtuxKTwGDFM035tnav6UtNUfAzDsODCOvcTestNIKdW+SYlaw= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=cygrunsrv, Hx-languages-length:2414, Hx-spam-relays-external:64.59.136.138, timestamps X-HELO: smtp-out-so.shaw.ca X-Authority-Analysis: v=2.2 cv=UpATD64B c=1 sm=1 tr=0 a=WqCeCkldcEjBO3QZneQsCg==:117 a=WqCeCkldcEjBO3QZneQsCg==:17 a=IkcTkHD0fZMA:10 a=AQJUoBvcukQLCN1DnjQA:9 a=QEXdDO2ut3YA:10 Subject: Re: when I try to open file with another user on CYGWIN , I get access denied message References: <2e1a331d-18e5-4dcc-0db6-257eeea2640a AT gmx DOT com> <592ee8fc-fbdb-7bea-3508-0e5e42dee689 AT gmx DOT com> To: cygwin AT cygwin DOT com From: Brian Inglis Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca Message-ID: <2554372a-1715-dea5-fbee-214773f3bdd1@SystematicSw.ab.ca> Date: Wed, 17 May 2017 08:53:55 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <592ee8fc-fbdb-7bea-3508-0e5e42dee689@gmx.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfGZ0TIDIQoCzKf/t4vhVRDPdCvKke+t9PGHdJx+J7DoFRkkXBArZojiL/qv5wm/KysA0tPT/afK2N5cjEk8S5QTVSu9P7Uic/X1KaK9Rhj72gyj3rD/R +46bbdZ2YmsWYxBH1VocjE/I8QrCyp+TVwSzsDNKvDzQwnp8MZMSHmi0jNSbde7m7CkSY4GMFqcOQg== X-IsSubscribed: yes On 2017-05-17 07:53, Alex wrote: > On 16/05/2017 20:08, Brian Inglis wrote: >> On 2017-05-16 02:12, Alex wrote: >>> I have windows 2008 server and external partner requested me to install >>> CGYWIN on it so they can send a file to via SSH. I created a domain user >>> called test1 and they sent me the public key and installed home folder. >>> They can send the file without any problem. I can able to read and >>> delete if I login to windows server with test1 username. >>> My problem is I can not open that files with another username. I have a >>> username call test2 and I need to login to windows server with this >>> username and run the script to import the files from test1 folder. I got >>> access denied message when I try to open it. >>> file permission show ; >>> -rwx------ >>> I changed the umask in profile to 002 , but did not fix the problem. >>> Any idea? >>> By the way I have a little knowledge of linux >> >> You would have to change umask in sshd's user's profile to perhaps have >> any effect. > > I did in the /etc/profile but not sure what you mean in sshd's user's > profile! Anything in sshd's startup that could change umask e.g. /etc/sshd.conf. None of init, systemd, nor cygrunsrv require shells, so /etc/profile is out. >> You may want to check the receiving directory DACLs with getfacl .../ >> and if necessary change them with setfacl -m d:g::r--,d:o::r-- if only >> data is being transferred to that directory. > > #getfacl samplefolder > #owner :gm-user1 > #group :Domain User > user ::rwx > group :: r-x > other:r-x > > Yes they only transfer to file in this folder, if I run setfacl for > this directory, will it apply to files inside and the file will be added > later ? Default ACLs are applied to directories or files created in that directory, modified by creation options, or later commands. >> Removing directory DACLs e.g. with setfacl -bk .../ can stop Windows >> programs being able to read or write directories or contents. >> >> Get them to set the permissions chmod +r on the source if possible, > they said already give the file with full permission for everyone > >> and send with scp -p. > ? What file transfer client are they using? You said ssh, so I assumed scp, -p retains permissions and timestamps. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple