public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Permissions not set for 'other' when copying from Windows
@ 2018-12-17 12:06 john doe
  2018-12-17 12:16 ` Corinna Vinschen
  0 siblings, 1 reply; 4+ messages in thread
From: john doe @ 2018-12-17 12:06 UTC (permalink / raw)
  To: cygwin

Hi,

I'm trying to understand why a copied file from 'C:\' into
/home/user/try doesn't have the permissions set for 'other' (see below).

The following will create a file named 'try.txt':

PS C:\> new-item try.txt -itemtype file


    Directory: C:\


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-a---        12/17/2018  04:10 PM          0 try.txt


PS C:\>


Now copying the newly created file using the cp command on Cygwin:

user@hostname ~/try
$ cp /cygdrive/c/try.txt $PWD/


Now, the touch utility is used to create a file named 'touch.txt':

user@hostname ~/try
$ touch touch.txt

The ls command shows:

user@hostname ~/try
$ ls -l
total 0
-rw-r--r-- 1 user None 0 Dec 17 04:12 touch.txt
-rwxr-x--- 1 user None 0 Dec 17 04:12 try.txt


When the file is created with the touch utility, the permissions are
properly set for 'user', 'group', and 'other' but when the file is
copied from outsite of Cygwin only the 'user' and 'group' permissions
are set.
Obviously, 'other' is not used on Cygwin, everytime the file is SCPed on
a linux server the permissions need to be change for 'other' to match
the permissions on that server.
Why is that so and is there a better way around this?


-- 
John Doe

--
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-12-17 15:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-17 12:06 Permissions not set for 'other' when copying from Windows john doe
2018-12-17 12:16 ` Corinna Vinschen
2018-12-17 15:21   ` john doe
2018-12-17 15:46     ` Corinna Vinschen

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).