* Wrong file permissions @ 2016-08-19 14:00 Björn Kautler 2016-08-19 15:22 ` Eliot Moss 0 siblings, 1 reply; 6+ messages in thread From: Björn Kautler @ 2016-08-19 14:00 UTC (permalink / raw) To: cygwin Hi, I have a problem I hope you can help me to solve. I switched to a new box at work and copied over my whole cygwin folder via rsync from the old box to the new one. But now if I do "touch tmp", the file gets 060 permissions and not 644 like before. This is very disturbing, as not even "cat <<<foo" works but errors out with "bash: cannot create temp file for here-document: Permission denied". I hope you can help me with this one. Regards Björn -- 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] 6+ messages in thread
* Re: Wrong file permissions 2016-08-19 14:00 Wrong file permissions Björn Kautler @ 2016-08-19 15:22 ` Eliot Moss 2016-08-22 10:58 ` Björn Kautler 0 siblings, 1 reply; 6+ messages in thread From: Eliot Moss @ 2016-08-19 15:22 UTC (permalink / raw) To: cygwin On 8/19/2016 8:27 AM, Björn Kautler wrote: > Hi, > > I have a problem I hope you can help me to solve. > I switched to a new box at work and copied over my whole cygwin folder via > rsync from the old box to the new one. > But now if I do "touch tmp", the file gets 060 permissions and not 644 like > before. > This is very disturbing, as not even "cat <<<foo" works but errors out with > "bash: cannot create temp file for here-document: Permission denied". > > I hope you can help me with this one. First, I suspect that Corinna, et al., will be interested in the output of icacls applied to a file/folder in question, and possibly cygcheck output. Second, rsync'ing your stuff over probably does not respect that you almost certainly have a new Windows SID on your new box. You probably need to change over ownership. And any group(s) you assigned probably did not carry over either. Yeah, it's a pain moving to a new box. I suspect others on the list will have suggestions as to best procedure to follow when moving over. In any case, this suggests using Windows commands (manipulation from a File Explorer opened with admin privileges) to insure that all your files have the right owner, and (if you follow my scheme mentioned below) to add a new group to the files (that can also be done using a recursive chgrp once things are in a state to allow it). For my part, I have found it helpful (or to my taste anyway) to create a new group, distinct from my user identity. (Windows typically kind of conflates the two, i.e., each user *is* a group, and that group is typically the primary group of files for which you are the primary user / creator.) I then chgrp all my Cygwin files to that group, and also set folders to propagate their group to newly created files (g+s, or 2000, permission on directories). For my backup programs to work I also set for all files/folders to have read access by SYSTEM and for that to propagate from folders. For files created by Windows programs I still sometimes need to adjust their group manually (sigh). I hope this hasn't been too terse for you to get some useful guidance. Cygwin community: Do we have guidance in the FAQ about moving a Cygwin installation to a new box? (I mean the user's files, not the install done by setup -- which (IMO) should be redone on a new box, not copied.) Regards -- Eliot Moss -- 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] 6+ messages in thread
* Re: Wrong file permissions 2016-08-19 15:22 ` Eliot Moss @ 2016-08-22 10:58 ` Björn Kautler 2016-08-23 14:19 ` Erik Soderquist 0 siblings, 1 reply; 6+ messages in thread From: Björn Kautler @ 2016-08-22 10:58 UTC (permalink / raw) To: moss, cygwin Hi Eliot, thanks for your answer. It seems this was an issue with the NTFS permissions. I also was not able to access the folders via Windows Explorer. After also fixing the Windows permissions it works now as expected so far. Do you really think I got a new SID on the new box when logging in with the same user of the same domain? Can I check this somehow? Why should the setup be redone on a new box? I'd need to do redo all installations, configuration, and so on. Besides ths permsissions issue I had, why shouldn't I just copy over the whole cygwin root directory? Everything cygwin related should be in there, isn't it? Regards Björn 2016-08-19 16:17 GMT+02:00 Eliot Moss <moss@cs.umass.edu>: > On 8/19/2016 8:27 AM, Björn Kautler wrote: >> >> Hi, >> >> I have a problem I hope you can help me to solve. >> I switched to a new box at work and copied over my whole cygwin folder via >> rsync from the old box to the new one. >> But now if I do "touch tmp", the file gets 060 permissions and not 644 >> like >> before. >> This is very disturbing, as not even "cat <<<foo" works but errors out >> with >> "bash: cannot create temp file for here-document: Permission denied". >> >> I hope you can help me with this one. > > > First, I suspect that Corinna, et al., will be interested in the output > of icacls applied to a file/folder in question, and possibly cygcheck > output. Second, rsync'ing your stuff over probably does not respect > that you almost certainly have a new Windows SID on your new box. You > probably need to change over ownership. And any group(s) you assigned > probably did not carry over either. Yeah, it's a pain moving to a new > box. I suspect others on the list will have suggestions as to best > procedure to follow when moving over. > > In any case, this suggests using Windows commands (manipulation from > a File Explorer opened with admin privileges) to insure that all your > files have the right owner, and (if you follow my scheme mentioned > below) to add a new group to the files (that can also be done using > a recursive chgrp once things are in a state to allow it). > > For my part, I have found it helpful (or to my taste anyway) to create > a new group, distinct from my user identity. (Windows typically kind > of conflates the two, i.e., each user *is* a group, and that group is > typically the primary group of files for which you are the primary > user / creator.) I then chgrp all my Cygwin files to that group, and > also set folders to propagate their group to newly created files > (g+s, or 2000, permission on directories). For my backup programs > to work I also set for all files/folders to have read access by > SYSTEM and for that to propagate from folders. For files created by > Windows programs I still sometimes need to adjust their group manually > (sigh). > > I hope this hasn't been too terse for you to get some useful guidance. > > Cygwin community: Do we have guidance in the FAQ about moving a Cygwin > installation to a new box? (I mean the user's files, not the install > done by setup -- which (IMO) should be redone on a new box, not copied.) > > Regards -- Eliot Moss > > -- > 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 > -- 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] 6+ messages in thread
* Re: Wrong file permissions 2016-08-22 10:58 ` Björn Kautler @ 2016-08-23 14:19 ` Erik Soderquist 2016-08-23 14:39 ` Eliot Moss 0 siblings, 1 reply; 6+ messages in thread From: Erik Soderquist @ 2016-08-23 14:19 UTC (permalink / raw) To: cygwin On Mon, Aug 22, 2016 at 3:59 AM, Björn Kautler wrote: > Hi Eliot, > > thanks for your answer. > > It seems this was an issue with the NTFS permissions. > I also was not able to access the folders via Windows Explorer. > After also fixing the Windows permissions it works now as expected so far. > > Do you really think I got a new SID on the new box when logging in > with the same user of the same domain? > Can I check this somehow? Your domain user SID will remain the same, however, all of the local machine's domain SIDs will be different as it is a different host on the domain, so I would expect permissions problems for any/all machine specific installations when doing a raw perms copy. > Why should the setup be redone on a new box? > I'd need to do redo all installations, configuration, and so on. I usually do this via script. Besides, after copying, unless you first do a full update on your source every time you'd still need to update to current for the latest fixes. > Besides ths permsissions issue I had, why shouldn't I just copy over > the whole cygwin root directory? > Everything cygwin related should be in there, isn't it? I would imagine all of the *files* are present in the cygwin root, but I've never checked, and a simple file copy, even if the adjustments are made to result in the correct permissions, will not get things like registry entries. (I don't know how many there are, but do know I've seen some). -- Erik ps: this is a "no top posting" email list; please put your comments and responses inline with what your are responding to so you do not disrupt the normal flow of reading. -- 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] 6+ messages in thread
* Re: Wrong file permissions 2016-08-23 14:19 ` Erik Soderquist @ 2016-08-23 14:39 ` Eliot Moss 2016-08-23 15:16 ` Erik Soderquist 0 siblings, 1 reply; 6+ messages in thread From: Eliot Moss @ 2016-08-23 14:39 UTC (permalink / raw) To: Erik Soderquist, cygwin On 8/23/2016 9:41 AM, Erik Soderquist wrote: > On Mon, Aug 22, 2016 at 3:59 AM, Björn Kautler wrote: > Your domain user SID will remain the same, however, all of the local > machine's domain SIDs will be different as it is a different host on > the domain, so I would expect permissions problems for any/all machine > specific installations when doing a raw perms copy. > > I would imagine all of the *files* are present in the cygwin root, but > I've never checked, and a simple file copy, even if the adjustments > are made to result in the correct permissions, will not get things > like registry entries. (I don't know how many there are, but do know > I've seen some). Thank you, Erik -- you answered better than I could have! I don't use a domain login, so the fact that my local SID is different has been very plain to me! Regards -- EM -- 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] 6+ messages in thread
* Re: Wrong file permissions 2016-08-23 14:39 ` Eliot Moss @ 2016-08-23 15:16 ` Erik Soderquist 0 siblings, 0 replies; 6+ messages in thread From: Erik Soderquist @ 2016-08-23 15:16 UTC (permalink / raw) To: cygwin On Tue, Aug 23, 2016 at 10:23 AM, Eliot Moss wrote: > Thank you, Erik -- you answered better than I could have! I don't > use a domain login, so the fact that my local SID is different has > been very plain to me! Multiple years as a network admin managing Windows/Linux/UNIX hybrid environments both with and without Windows AD involved has lead me to many many interesting twists in how the SIDs are handled... I particularly ran into the machine specific SIDs when ghosting client machines for faster reload and deployment... You can imagine the fun I had sorting out why adding a freshly ghosted machine to the domain caused things to break on another machine... -- Erik -- 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] 6+ messages in thread
end of thread, other threads:[~2016-08-23 14:39 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-08-19 14:00 Wrong file permissions Björn Kautler 2016-08-19 15:22 ` Eliot Moss 2016-08-22 10:58 ` Björn Kautler 2016-08-23 14:19 ` Erik Soderquist 2016-08-23 14:39 ` Eliot Moss 2016-08-23 15:16 ` Erik Soderquist
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).