• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Cannot exec chroot on NFS mounted vhost.

raytracy

Basic Pleskian
I got the following error when ssh login to a chrooted vhost which mounted on NFS:

Jul 25 04:00:04 imglib plesk-chrootsh[11740]: execv("/bin/bash") failed
Jul 25 04:00:04 imglib plesk-chrootsh[11740]: system error: Permission denied


And found the KB
Error when enabling chroot: execv("/bin/bash") failed, system error: Permission denied

I have follow KB to change the NFS mount to exec option, but problem still persist:

/etc/fstab:
pve1data:/IMGLIB /var/www nfs defaults,_netdev,exec,context="system_u:eek:bject_r:httpd_sys_rw_content_t:s0" 0 1

Since I am not familiar with NFS permission, is there any thing I missing?

CentOS 7.3+Onyx 17.5#MU14, SELinux set as permissive.
 
Please, try to disable SELinux completely or try to set the correct boolean to allow the web server to use NFS:

# setsebool -P httpd_use_nfs 1
 
Yes, I did setbool httpd_use_nfs and setenforce to permissive. In fact, I did set the following:

setsebool -P httpd_use_nfs 1
setsebool -P git_system_use_nfs 1
setsebool -P httpd_can_sendmail=1
setsebool -P httpd_can_network_connect=1
setsebool -P ftp_home_dir on

The most confused thing is: httpd ask me to set httpd_sys_rw_content_t or it will be denied to access files, but chroot seems ask me to set httpd_sys_content_t, I don't know how can I set both context together to a mount point?

Hmmmm...I will try to disable SELinux later, but I really need this feature because my client's auditor ask for and we are prohibited to operate without it.

Do you have a complete procedure guide to setup SELinux for Onyx with nfs mount?
 
Do you have a complete procedure guide to setup SELinux for Onyx with nfs mount?
Sorry, but we do not have. I've never tried using NFS for vhosts location. It would be interesting to see the results of your research on this problem.
 
Back
Top