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

new files get "system" attribute (sysFsOpen, fopen, etc..) #25

Open
mrwicked opened this issue May 17, 2011 · 2 comments
Open

new files get "system" attribute (sysFsOpen, fopen, etc..) #25

mrwicked opened this issue May 17, 2011 · 2 comments

Comments

@mrwicked
Copy link

The following functions create files with a "system" attribute:

fd = fopen("foo, "wt");
sysFsOpen("foo", SYS_O_WRONLY | SYS_O_CREAT | SYS_O_TRUNC, &fd, NULL, 0);

According to the specs they should be "archive" only.

@mrwicked
Copy link
Author

mrwicked commented Jun 4, 2011

Quite annoying. We have the same problem with folder names; a "simple" mkdir() will create a folder with the system attribute as well..

I tried to mess around with umask() and also tried to set g_umask explicitly both to no avail. Who has a solution? Or where should I look?

@mrwicked
Copy link
Author

mrwicked commented Jun 4, 2011

I found a workaround. I'm now calling sysFsChmod(foo, S_IFMT | 0777); after each fopen/mkdir, etc.. I'll try and see if I can get this into umask.c

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