2

I'm on Oracle Linux 7.6. The user root apparently has write permission for its own home directory /root. But why the mode bits of /root shows dr-xr-x---. instead of drwxr-x---.?

root:[~]# cat /etc/*release*
Oracle Linux Server release 7.6
NAME="Oracle Linux Server"
VERSION="7.6"
ID="ol"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.6"
PRETTY_NAME="Oracle Linux Server 7.6"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:6:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.6
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.6
Red Hat Enterprise Linux Server release 7.6 (Maipo)
Oracle Linux Server release 7.6
cpe:/o:oracle:linux:7:6:server
root:[~]#
root:[~]# pwd
/root
root:[~]# ls -lad .
dr-xr-x---. 9 root root 4096 Aug 16 21:37 .
root:[~]#


root:[~]# cd /
root:[/]#
root:[/]#
root:[/]# getfacl root
# file: root
# owner: root
# group: root
user::r-x
group::r-x
other::--x

root:[/]#
Just a learner
  • 1,766
  • 4
  • 22
  • 32
  • 6
    root doesn't need write permission -- root implies the `CAP_DAC_OVERRIDE` capability (it can read/write/search any file/dir, no matter its permissions). But I have no idea why they didn't keep the `w` permission on `/root` in rhel/centos/etc (as it's usual in other systems, even if it's just for decoration). –  Aug 16 '19 at 14:11
  • `/` is not root's home directory. – ctrl-alt-delor Jun 26 '20 at 17:25

0 Answers0