Web lists-archives.com

Cannot use screen when Cygwin is installed on a FAT32 filesystem / chmod does not work on FAT32 directories

I'm trying to use Cygwin on a Windows machine with the latest release. The system in question must run from a filesystem formatted with FAT32 and therefore inherits the 'noacl' field according to the documentation.

After a clean install and running Cygwin.bat, I am greeted with the following error when attempting to call 'screen -ls':

> $ screen -ls
> Directory /tmp/uscreens/S-MyUserName must have mode 700.

Note that at this point the /tmp/uscreens directory has been created for the first time.

Closing this terminal, reopening it, and calling 'screen -ls' again results in the following error:

> $ screen -ls
> Directory '/tmp/uscreens' must have mode 777.

The problem is that screen requires that the /tmp/uscreens directory have mode 777. This directory is already accessible to 'Everyone' with all permissions but is recognized only as 'drwxr-xr-x' (755). This appears to be an issue specifically with how permissions are displayed on a FAT32 drive as I can confirm that I have never had this issue on an NTFS filesystem with the 'noacl' flag specified in fstab.

I thought that I could workaround this by simply patching these checks out so I downloaded the source and removing the offending lines:

> if (((int)st.st_mode & 0777) != n)
>   Panic(0, "Directory '%s' must have mode %03o.", SockDir, n);
> if ((st.st_mode & 0777) != 0700)
>   Panic(0, "Directory %s must have mode 700.", SockPath);

This allows screen to run and for screens to be created. But now it fails to list any screens.

When no screens exist I get the following output:

> $ screen -ls
> No Sockets found in /tmp/uscreens/S-MyUserName

And when screens exists:

> $ screen -ls
> There is a screen on:
> 1 Socket in /tmp/uscreens/S-MyUserName

Notice that a screen is detected (the output is formatted correctly) but the screens are not populated in the list.

I'm thinking that this new problem may reside within socket.c of screen's source code but I'm not sure.

I have read a number of comments online about these permission errors for both Cygwin and various Linux installations. All of them recommend either setting the permissions to 777 with chmod or altering the NTFS permissions, both of which has no affect on the directory permissions for the FAT32 filesystem (but confirmed working on NTFS).

Is there someone available to assist me in looking into this? It appears as though I've uncovered a somewhat obscure bug.

Thank you.

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