Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle "setting permissions on DOT_SAGE" better on Cygwin #20606

Closed
embray opened this issue May 13, 2016 · 2 comments
Closed

Handle "setting permissions on DOT_SAGE" better on Cygwin #20606

embray opened this issue May 13, 2016 · 2 comments

Comments

@embray
Copy link
Contributor

embray commented May 13, 2016

For one, this code should only be executed if os.chmod exists, which it does not normally on Windows. Granted, we are not currently targeting native Windows support, but for the future it's nice to check.

At any rate, this often fails quietly on Cygwin as well. This is because Windows filesystems can be mounted in Cygwin with or without ACL (Access Control List) support--Windows' (and hence NTFS's native filesystem permission system). With ACL support enabled, Cygwin's FS layer tries (and does a reasonably good job) at emulating UNIX-style permissions through the ACL.

However, if a filesystem is mounted with no ACL support, most attempts to chmod a file or directory will either result in a no-op, or at least not do exactly what was expected (minimal support for the read-only flag is provided, but not much else). Therefore, setting the requested permissions on DOT_SAGE will quietly fail, resulting in repetitious "Setting permissions of DOT_SAGE directory" messages every single time sage.misc is imported. This also causes several tests to break.

As a workaround, when the permissions are not actually being set we just remain quiet about it and don't tell the user that something is happening when it isn't.

Component: porting: Cygwin

Author: Erik Bray

Branch/Commit: 33da821

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/20606

@embray embray added this to the sage-7.3 milestone May 13, 2016
@tscrim
Copy link
Collaborator

tscrim commented Aug 7, 2016

Reviewer: Travis Scrimshaw

@vbraun
Copy link
Member

vbraun commented Aug 10, 2016

Changed branch from u/embray/cygwin-dot-sage to 33da821

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants