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

chown and chmod implementations #361

Open
doctorpangloss opened this issue Aug 30, 2023 · 0 comments
Open

chown and chmod implementations #361

doctorpangloss opened this issue Aug 30, 2023 · 0 comments

Comments

@doctorpangloss
Copy link

chown -R `whoami` C:/some/path

is equivalent to

icacls C:/some/path /setowner "$USERNAME" /t

for adding permissions

chmod -R u+rwx C:/some/path

is equivalent to

OWNER=$(powershell '(Get-Acl "C:/some/path").Owner')
icacls "C:/some/path" /inheritance:e /t /grant:r "$OWNER:F"

there isn't a direct equivalent as you say. the underlying pain point is really the absence of a sudo implementation, so users start shells with administrative privileges, and then write directories owned by an administrator. then they discover there's no "easy" way to reset the privileges as though they were written by the ordinary user.

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

No branches or pull requests

1 participant