GNU screen on Cygwin: Cannot seem to reattach, no matter what I try

Andrew Schulman schulman.andrew@epamail.epa.gov
Wed May 11 13:27:00 GMT 2011


> On May 10 15:07, Andrew Schulman wrote:
> > > a session that I detached on the same tty just seconds before.
> > > 
> > > 3. chmod 666 on the socket file did not work (its permissions were 
> > > already 644, owned my 'morse', as shown in my original session long).
> > 
> > No, I suggested that you try 0600, on the theory that your 0640 permissions
> > might be too permissive, and screen would refuse to use the socket.
> > Unlikely, but worth a try.
> > 
> > However, if your socket is on a FAT file system, I don't know if you can
> > set 0600 permissions.
> > 
> > > HOWEVER, I am wondering: my Cygin /tmp *IS* on a FAT32 filesystem, *NOT* 
> > > an NTFS filesystem.  Would that matter?  Are socket files properly 
> > > handled by Cygwin on FAT32?  (I've never used a socket-based Cygwin 
> > > program on this host before, at least not to my knowledge.)
> > 
> > Hm, that could explain it.  I don't recall this coming up before.
> 
> AF_LOCAL/AF_UNIX sockets are handled on all file systems.
> 
> But FAT/FAT32 have no provisions to store permissions like NTFS has.
> Therefore the POSIX permission bits are only faked, 0755 for
> directories, 0755 for files with the suffixes .exe, .lnk., and .com,
> 0644 otherwise.  If you chmod -r a file you get 0555 for .exe etc, or
> 0444 otherwise.
> 
> You can probably live with this if you can do without permissions on
> files, but here's one of the cases where the application apparently
> checks for permissions.  Same goes for many other security sensitive
> applications.
> 
> My unofficial, very personal recommendation:  Don't use FAT/FAT32 unless
> you really have to, for instance on USB sticks shared with embedded
> gear.  Otherwise FAT/FAT32 is a crappy, unsecure, space-wasting file
> system about as modern as the roman empire.  And you know, what have
> the romans ever done for us?

They left some pretty great ruins, I was climbing on 'em 2 weeks ago.  But
that's not much of a model for Cygwin.

My dim recollection is that screen will refuse to reattach to a socket
whose permissions are too loose.  Of course if that's the problem here,
then (1) screen created the socket but then didn't bother to check that the
right permissions had been set on it; and (2) it gave a completely
unhelpful error message when it refused to reattach.  Both of those are
possible and I could probably fix them in a spare hour or two.

So, it seems that my suggestion #2 is the one to try.


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



More information about the Cygwin mailing list