why sudo create directories in wrong permission drwxr-sr-x?

1

1

I run sudo on ArchLinux(on x86_64) and Fedora(on sh4 cpu). They behavior different.

sudo mkdir x
ls -l x
  • It shows drwxr-xr-x root root x on ArchLinux.
  • But shows drwxr-sr-x root mygroup x on Fedora sh4.

I'm wonder how to fixed this problem. I've tried put /etc/sudoers on Fedora, but it still create on wrong permission.

Defaults umask=0022

Daniel YC Lin

Posted 2013-01-29T07:56:25.830

Reputation: 795

1What does sudo umask return, and what are the permissions of the parent directory where you are creating the subdirectory? – Paul – 2013-01-29T09:17:15.643

Thank you Paul. my root use 'busybox sh'. So, sudo umask will display unkown command. I guess you may found my problem, it is caused by the parent directory. – Daniel YC Lin – 2013-01-29T12:24:35.260

No answers