setgid bit in umask of systemd service script
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I have a downloader service running, and I'd like it to set the setgid bit of every directory it creates. Its already doing so, but I suspect that's because at the moment, the parent directory also has setgid. What do I set the umask to?
I'm also wondering how umask, particularly in a systemd script, works for the "4th" digit. I understand that its inverted, so that umask = 002 is like chmod 775. But what about umask = 2002. Is that chmod 5775? or chmod 2775?
Thanks!
linux ubuntu files filesystems
add a comment |Â
up vote
1
down vote
favorite
I have a downloader service running, and I'd like it to set the setgid bit of every directory it creates. Its already doing so, but I suspect that's because at the moment, the parent directory also has setgid. What do I set the umask to?
I'm also wondering how umask, particularly in a systemd script, works for the "4th" digit. I understand that its inverted, so that umask = 002 is like chmod 775. But what about umask = 2002. Is that chmod 5775? or chmod 2775?
Thanks!
linux ubuntu files filesystems
It should be2775
!
â George Udosen
Jan 22 at 1:33
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have a downloader service running, and I'd like it to set the setgid bit of every directory it creates. Its already doing so, but I suspect that's because at the moment, the parent directory also has setgid. What do I set the umask to?
I'm also wondering how umask, particularly in a systemd script, works for the "4th" digit. I understand that its inverted, so that umask = 002 is like chmod 775. But what about umask = 2002. Is that chmod 5775? or chmod 2775?
Thanks!
linux ubuntu files filesystems
I have a downloader service running, and I'd like it to set the setgid bit of every directory it creates. Its already doing so, but I suspect that's because at the moment, the parent directory also has setgid. What do I set the umask to?
I'm also wondering how umask, particularly in a systemd script, works for the "4th" digit. I understand that its inverted, so that umask = 002 is like chmod 775. But what about umask = 2002. Is that chmod 5775? or chmod 2775?
Thanks!
linux ubuntu files filesystems
asked Jan 21 at 21:25
Kayson
82
82
It should be2775
!
â George Udosen
Jan 22 at 1:33
add a comment |Â
It should be2775
!
â George Udosen
Jan 22 at 1:33
It should be
2775
!â George Udosen
Jan 22 at 1:33
It should be
2775
!â George Udosen
Jan 22 at 1:33
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
I believe the octal numbers for:
- sticky bit is
1
, - setgid on directories:
2
, and - setuid on files:
4
.
So for the case your asking it would be: umask 2002
==> 2775
for folders.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
I believe the octal numbers for:
- sticky bit is
1
, - setgid on directories:
2
, and - setuid on files:
4
.
So for the case your asking it would be: umask 2002
==> 2775
for folders.
add a comment |Â
up vote
0
down vote
accepted
I believe the octal numbers for:
- sticky bit is
1
, - setgid on directories:
2
, and - setuid on files:
4
.
So for the case your asking it would be: umask 2002
==> 2775
for folders.
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
I believe the octal numbers for:
- sticky bit is
1
, - setgid on directories:
2
, and - setuid on files:
4
.
So for the case your asking it would be: umask 2002
==> 2775
for folders.
I believe the octal numbers for:
- sticky bit is
1
, - setgid on directories:
2
, and - setuid on files:
4
.
So for the case your asking it would be: umask 2002
==> 2775
for folders.
answered Jan 22 at 1:38
George Udosen
1,112318
1,112318
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f418694%2fsetgid-bit-in-umask-of-systemd-service-script%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
It should be
2775
!â George Udosen
Jan 22 at 1:33