root身份下指定用户执行命令

su www -s /bin/bash -c 'mkdir 123'
su www -c 'nohup php think queue:work --queue JobClass 1>/dev/null 2>&1 &'
原文地址:https://www.cnblogs.com/godehi/p/13087314.html