--- id: oschmod version: "0.3.12" license: Apache Software License 2.0 license_treatment: permissive maintenance: abandoned --- # oschmod — Windows and Linux compatible chmod License: permissive · Maintenance: abandoned · Downloads: 337.2K/mo ## What it is and what it does oschmod bridges a critical gap: Python's os.chmod() silently fails on Windows, leaving file permissions unchanged while giving no warning or error. This package provides a cross-platform wrapper that translates chmod-style permissions (both symbolic like 'u+rwx' and octal like 0o700) into the underlying OS calls—using Windows security APIs on Windows, and standard POSIX chmod on Linux and macOS. You can use it as a drop-in replacement for os.chmod() in your code, or invoke it from the command line with the familiar chmod syntax. It supports recursive permission changes with the -R flag and handles both individual file ownership and group-based permissions in a platform-consistent way. Use it for: - Securing configuration files or private keys on Windows with the same permission model you'd use on Linux. - Writing deployment scripts that set consistent file permissions across development, staging, and production machines running different OSes. - Building cross-platform tools that need to enforce read/write/execute restrictions without platform-specific branching logic. - Migrating shell scripts that use chmod to Python while maintaining the same permission semantics on all platforms. - Setting up CI/CD pipelines that manage file permissions identically on Windows agents and Unix-based runners. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Sets file permissions consistently across Windows, Linux, and macOS using chmod-style syntax that actually works on Windows, where os.chmod() has no effect. Yes, if you need cross-platform chmod on Windows and can accept an abandoned package. The code is stable (no known vulnerabilities, low install friction), and the problem it solves is real and unsolved by the standard library. However, verify that pywin32 remains compatible with your Windows version, and be aware that bugs or edge cases discovered after 2023 will not be fixed upstream. ## Install pip install oschmod uv add oschmod poetry add oschmod ## Installing oschmod Before you install: Low install friction; pure Python wheel with a single runtime dependency (pywin32). However, the package is abandoned—last release was 2020-10-30 and last commit 2023-01-16, so no active maintenance or bug fixes. License in practice: Apache Software License 2.0 is permissive; you can use, modify, and distribute oschmod freely in commercial or private projects with minimal restrictions. Quickstart: pip install oschmod import oschmod oschmod.set_mode('myfile', 'u+rwx') oschmod.set_mode('myfile', 0o700) On Windows, requires pywin32 to be installed and functional; on Linux/macOS, relies on standard POSIX permission APIs. Verify before relying: - Whether pywin32 dependency is reliably maintained and compatible with current Windows versions. - Whether the package works correctly with modern Python versions beyond 3.8 (classifiers list only up to 3.8). - Real-world compatibility with Windows ACLs and how symbolic/octal modes map to actual Windows security descriptors. ## Package facts - License: Apache Software License 2.0 (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 337.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags cross-platform file permissions, chmod for windows, set file permissions all platforms, windows file mode bits, portable chmod implementation, symbolic file permissions, octal mode cross-platform, cross-platform, file-permissions, windows-compat [View on SkillFed](https://skillfed.io/packages/oschmod) · [View on PyPI](https://pypi.org/project/oschmod/)