Skip to content

sudo -i chdir fails sometimes with SELinux enforcing #160

@neutronscott

Description

@neutronscott
[user@server ~]$ sudo -r unconfined_r -t unconfined_t -i -u oracle bash
sudo: unable to change directory to /home/oracle: Permission denied
sudo: unable to execute /bin/bash: Permission denied
[user@server ~]$ sudo -r unconfined_r -t unconfined_t -s -u oracle bash
[oracle@server user ]$ cd
[oracle@server ~ ]$ pwd
/home/oracle
[oracle@server ~ ]$

This is because /home/oracle is a different context than original user can access. SELinux role isn't set until later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions