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

Argument for fwrite to set the file 'Owner' on Windows #5858

Closed
msgoussi opened this issue Dec 27, 2023 · 4 comments
Closed

Argument for fwrite to set the file 'Owner' on Windows #5858

msgoussi opened this issue Dec 27, 2023 · 4 comments

Comments

@msgoussi
Copy link

Is it possible to add a creator argument in fwrite that controls the owner property in Details Tab in Windows?
image

@MichaelChirico MichaelChirico changed the title Creator Feature Argument for fwrite to set the file 'Owner' on Windows Dec 27, 2023
@MichaelChirico
Copy link
Member

AFAICT the way to do so is with a command line utility 'icacls', e.g.

https://github.com/zerland/MAGMA_Celltyping/blob/8cb235fb495a467fb825819a76b2f154d3840146/R/set_permissions.R#L19-L23

Why should {data.table} own this logic? It seems more natural to me that another package/wrapper would simply follow up the fwrite():

fwrite(table, file)
set_acls(file)

@msgoussi
Copy link
Author

when i use openxlsx::write.xlsx, there is a argument called "creator".
Thanks in advance

@MichaelChirico
Copy link
Member

AFAICT they do so relying on some code in the C++ API. It makes more sense for a package like {openxlsx} to be deeply integrated with Windows. I think {data.table} should be more platform-agnostic.

@jangorecki
Copy link
Member

Completely agree. A good workaround could be to use wsl in windows and run something like this

sudo -u newOwner R

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