Я использую ОС Centos7, у меня есть этот скрипт, который монтирует папку из Windows PC
exec('sudo mount -t cifs -o username="'.$user.'",password="'.$pass.'",dir_mode=0777,file_mode=0777
//'.$ip_address.'/c/kitpos/update /mnt 2>&1', $output, $results);
И я получил это причудливое сообщение об ошибке, похожее на проблему с разрешением.
Array
(
[0] =>
[1] => We trust you have received the usual lecture from the local System
[2] => Administrator. It usually boils down to these three things:
[3] =>
[4] => #1) Respect the privacy of others.
[5] => #2) Think before you type.
[6] => #3) With great power comes great responsibility.
[7] =>
[8] => sudo: no tty present and no askpass program specified
)
Владение моей папкой / mnt и разрешение root
и 777
, но даже если я изменю это www-data: www-data, под которой работает мой php, все равно получит ту же ошибку.
777 drwxrwxrwx 2 root root 4096 mnt
У меня также есть сервер Ubuntu, но он отлично работает с тем же кодом.У кого-нибудь есть идея?