Hi, I'm confused, why can root not change context of a directory ? I've moved a mysql dir from /var/lib to another drive. But running sudo chcon -R -t mysqld_t ./mysql Yields a screen full of messages such as chcon: failed to change context of ?schema_table_lock_waits.frm? to ?system_u:object_r:mysqld_t:s0?: Permission denied (and yes, mysql was shut down before the move and is till shut down).
Alexander Dalloz
2017-Feb-10 19:06 UTC
[CentOS] chcon failed to change context Permission denied
Am 10.02.2017 um 16:59 schrieb Tim Smith:> Hi, > > I'm confused, why can root not change context of a directory ? > > I've moved a mysql dir from /var/lib to another drive. > > But running sudo chcon -R -t mysqld_t ./mysql > > Yields a screen full of messages such as > > chcon: failed to change context of ?schema_table_lock_waits.frm? to > ?system_u:object_r:mysqld_t:s0?: Permission denied > > (and yes, mysql was shut down before the move and is till shut down).Because mysqld_t is a process type and the proper file context would be mysqld_db_t? Alexander
oops ! Thanks ! On 10 February 2017 at 19:06, Alexander Dalloz <ad+lists at uni-x.org> wrote:> Am 10.02.2017 um 16:59 schrieb Tim Smith: >> >> Hi, >> >> I'm confused, why can root not change context of a directory ? >> >> I've moved a mysql dir from /var/lib to another drive. >> >> But running sudo chcon -R -t mysqld_t ./mysql >> >> Yields a screen full of messages such as >> >> chcon: failed to change context of ?schema_table_lock_waits.frm? to >> ?system_u:object_r:mysqld_t:s0?: Permission denied >> >> (and yes, mysql was shut down before the move and is till shut down). > > > Because mysqld_t is a process type and the proper file context would be > mysqld_db_t? > > Alexander > > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos
Possibly Parallel Threads
- chcon failed to change context Permission denied
- Moving Mysql data directory denied by selinux?
- NOT Solved - Re: SELinux policy to allow Dovecot to connect to Mysql
- Unable to apply mysqld_db_t to mysql directory
- SELinux is preventing /usr/bin/chcon "mac_admin" access