# mount
fuse-overlayfs on / type fuse.fuse-overlayfs (rw,nodev,noatime,user_id=0,group_id=0,default_permissions,allow_other)
sysfs on /sys type sysfs (ro,nosuid,nodev,noexec,relatime,seclabel)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev type tmpfs (rw,nosuid,context="system_u:object_r:container_file_t:s0:c552,c859",size=65536k,mode=755,uid=1000,gid=1000)
/home/test/relabel_bug_container on /relabel_bug type ext4 (rw,relatime,seclabel)
tmpfs on /run/secrets type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=798884k,mode=700,uid=1000,gid=1000)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime,seclabel)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,context="system_u:object_r:container_file_t:s0:c552,c859",gid=100004,mode=620,ptmxmode=666)
tmpfs on /etc/resolv.conf type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=798884k,mode=700,uid=1000,gid=1000)
tmpfs on /etc/hosts type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=798884k,mode=700,uid=1000,gid=1000)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,context="system_u:object_r:container_file_t:s0:c552,c859",size=64000k,uid=1000,gid=1000)
tmpfs on /etc/hostname type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=798884k,mode=700,uid=1000,gid=1000)
tmpfs on /run/.containerenv type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=798884k,mode=700,uid=1000,gid=1000)
cgroup2 on /sys/fs/cgroup type cgroup2 (ro,nosuid,nodev,noexec,relatime,seclabel,nsdelegate)
devtmpfs on /dev/null type devtmpfs (rw,nosuid,seclabel,size=3974416k,nr_inodes=993604,mode=755)
devtmpfs on /dev/zero type devtmpfs (rw,nosuid,seclabel,size=3974416k,nr_inodes=993604,mode=755)
devtmpfs on /dev/full type devtmpfs (rw,nosuid,seclabel,size=3974416k,nr_inodes=993604,mode=755)
devtmpfs on /dev/tty type devtmpfs (rw,nosuid,seclabel,size=3974416k,nr_inodes=993604,mode=755)
devtmpfs on /dev/random type devtmpfs (rw,nosuid,seclabel,size=3974416k,nr_inodes=993604,mode=755)
devtmpfs on /dev/urandom type devtmpfs (rw,nosuid,seclabel,size=3974416k,nr_inodes=993604,mode=755)
tmpfs on /proc/acpi type tmpfs (ro,relatime,context="system_u:object_r:container_file_t:s0:c552,c859",size=0k,uid=1000,gid=1000)
devtmpfs on /proc/kcore type devtmpfs (rw,nosuid,seclabel,size=3974416k,nr_inodes=993604,mode=755)
devtmpfs on /proc/keys type devtmpfs (rw,nosuid,seclabel,size=3974416k,nr_inodes=993604,mode=755)
devtmpfs on /proc/latency_stats type devtmpfs (rw,nosuid,seclabel,size=3974416k,nr_inodes=993604,mode=755)
devtmpfs on /proc/timer_list type devtmpfs (rw,nosuid,seclabel,size=3974416k,nr_inodes=993604,mode=755)
devtmpfs on /proc/sched_debug type devtmpfs (rw,nosuid,seclabel,size=3974416k,nr_inodes=993604,mode=755)
tmpfs on /proc/scsi type tmpfs (ro,relatime,context="system_u:object_r:container_file_t:s0:c552,c859",size=0k,uid=1000,gid=1000)
tmpfs on /sys/firmware type tmpfs (ro,relatime,context="system_u:object_r:container_file_t:s0:c552,c859",size=0k,uid=1000,gid=1000)
tmpfs on /sys/fs/selinux type tmpfs (ro,relatime,context="system_u:object_r:container_file_t:s0:c552,c859",size=0k,uid=1000,gid=1000)
proc on /proc/asound type proc (ro,relatime)
proc on /proc/bus type proc (ro,relatime)
proc on /proc/fs type proc (ro,relatime)
proc on /proc/irq type proc (ro,relatime)
proc on /proc/sys type proc (ro,relatime)
proc on /proc/sysrq-trigger type proc (ro,relatime)
devpts on /dev/console type devpts (rw,nosuid,noexec,relatime,context="system_u:object_r:container_file_t:s0:c552,c859",gid=100004,mode=620,ptmxmode=666)
# python3
Python 3.7.4 (default, Aug 12 2019, 14:45:07)
[GCC 9.1.1 20190605 (Red Hat 9.1.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import shutil
>>> shutil.copy2('/tmp/some_file', '/relabel_bug/failure')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python3.7/shutil.py", line 267, in copy2
copystat(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib64/python3.7/shutil.py", line 209, in copystat
_copyxattr(src, dst, follow_symlinks=follow)
File "/usr/lib64/python3.7/shutil.py", line 165, in _copyxattr
os.setxattr(dst, name, value, follow_symlinks=follow_symlinks)
PermissionError: [Errno 13] Permission denied: '/relabel_bug/failure'