简体   繁体   中英

PHP shell df-h not see external drive

If I run df -h command in the terminal, it is returning with:

udev            1,5G     0  1,5G   0% /dev
tmpfs           312M  2,0M  310M   1% /run
/dev/sda1       109G  7,8G   96G   8% /
tmpfs           1,6G   29M  1,5G   2% /dev/shm
tmpfs           5,0M  4,0K  5,0M   1% /run/lock
tmpfs           1,6G     0  1,6G   0% /sys/fs/cgroup
/dev/loop0       36M   36M     0 100% /snap/gtk-common-themes/1198
/dev/loop2       90M   90M     0 100% /snap/core/6673
/dev/loop1       68M   68M     0 100% /snap/sublime-text/51
/dev/loop3       68M   68M     0 100% /snap/sublime-text/58
/dev/loop4      190M  190M     0 100% /snap/gitkraken/138
/dev/loop5      137M  137M     0 100% /snap/termius-app/29
/dev/loop6       54M   54M     0 100% /snap/core18/782
/dev/loop7       54M   54M     0 100% /snap/core18/941
tmpfs           312M   20K  312M   1% /run/user/122
tmpfs           312M   44K  312M   1% /run/user/1000
/dev/sdb2       112G   23G   89G  21% /media/benadzs/E4C0DB03C0DADB3E

But I want running it from PHP shell, but it is not seeing /dev/sdb2. The file has root permission.

www-data ALL=(ALL:ALL) NOPASSWD:ALL
我将其粘贴到visudo,现在可以使用了。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM