Skip to content

[Bug] Writing to exfat drive on linux #58

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

Closed
paulhayes opened this issue Feb 3, 2020 · 0 comments
Closed

[Bug] Writing to exfat drive on linux #58

paulhayes opened this issue Feb 3, 2020 · 0 comments

Comments

@paulhayes
Copy link

paulhayes commented Feb 3, 2020

What / Why

I'm writing to an external exfat formatted drive on linux. This is a root mounted drive with no permissions system, so everyfile is owned by root, with full rw access to all users. So I have read, write access to the file.

write-file-atomic is trying to set the ownership of the file.
chown: changing ownership of '/media/sandisk/config.json': Operation not permitted

I know that you advice to pass false to the permission option, however this is a 2nd level dependancy, so I'm not actually using this library directly. I'm using
json-future, which has a dependancy for write-json-file, which is using write-file-atomic.

I think if write-file-atomic is just going to set the uid to the existing user, it could catch this error and squash it, as chown failing has no impact.

@paulhayes paulhayes changed the title [BUG] <title> Writing to exfat drive on linux Feb 3, 2020
@paulhayes paulhayes changed the title Writing to exfat drive on linux [Bug] Writing to exfat drive on linux Feb 3, 2020
paulhayes added a commit to paulhayes/write-json-file that referenced this issue Feb 3, 2020
Due to a bug in write-file-atomic saving to a permissionless filesystem ( eg fat32, exfat ) in linux without explicitly setting chown to false, causes the write to fail. As noted here: npm/write-file-atomic#58

By simply setting chown argument explicitly, this error will not occur.
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