-
Notifications
You must be signed in to change notification settings - Fork 54
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
How to create directory with sticky tag? #184
Comments
Hi, the octal syntax for mode flags requires that the number be preceded by a zero, so
seems ok for me. It looks like I missed the last form, will add it and also add some tests for sticky bits as there arent any right now... |
Thanks for the blazing fast reply as always. I think there is a bug though:
|
Hmm, I get
which is different. But if I strace it I see:
So it is doing what it is told, but oddly stracing the mkdir:
So the standard strace doesnt actually do what it is told to, but it does do the right thing! I need to look into libc and see if it justifies this behaviour. In the meantime you may be able to get the result you want by setting the umask with ljsyscall I guess... Thats really odd, I need some coffee! |
@justincormack I found that it works for me if I do an umask to 0 on advance:
E.g. we both already had an umask? |
I think the coreutils mkdir(1) program basically wraps this clearing of the umask, but the system call/glibc do not and behave like ljsyscall. |
@justincormack Is there a way I can get the current umask so I can set it back to its original state after changing it? I fear setting the process umask somewhere might have unintended side effects. |
Its kind of stupid, the umask syscall returns the current value, but you have to change it too before you know what it was, so
should work (untested). |
How can I create a directory with the sticky tag using ljsyscall? I tried the following without success:
The text was updated successfully, but these errors were encountered: