public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: when I try to open file with another user on CYGWIN , I get access denied message
Date: Wed, 17 May 2017 17:08:00 -0000	[thread overview]
Message-ID: <2554372a-1715-dea5-fbee-214773f3bdd1@SystematicSw.ab.ca> (raw)
In-Reply-To: <592ee8fc-fbdb-7bea-3508-0e5e42dee689@gmx.com>

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

  reply	other threads:[~2017-05-17 14:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-16  9:15 Alex
2017-05-16 11:31 ` Dan Kegel
2017-05-16 14:59   ` Alex
2017-05-16 15:22     ` cyg Simple
2017-05-17 13:46       ` Alex
2017-05-16 19:14     ` Dan Kegel
2017-05-17 13:53       ` Alex
2017-05-17 14:35         ` Eliot Moss
2017-05-16 17:12 ` Brian Inglis
2017-05-17 14:02   ` Alex
2017-05-17 17:08     ` Brian Inglis [this message]
2017-05-18 12:23     ` Andrey Repin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2554372a-1715-dea5-fbee-214773f3bdd1@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).