I mounted a SMB share folder under /mnt/smb/ and I can access the files. When I unmount this shared folder using command:
umount /mnt/smb/
naturally I cannot list shared folder contents using command:
ls /mnt/smb/
But the problem is when I run the ls command from a PHP file on the same machine, the contents of shared SMB folder can be listed! The contents of PHP file is:
<?php
$command = 'ls /mnt/smb/';
$result = shell_exec($command);
echo $result;
?>
What is my mistake. Is there any other commanf needed for completely unmount the SMB share? I also used command below but there was no luck:
fusermount -u /mnt/smb/
mount | grep /mnt/smbafterumounting (whenlsfrom the shell does not work), then also check whether the command gives the same result (hopefully, an empty line) after accessing fromphp. If there is a difference maybe the share is auto-mounted again. NB: If the output of themountcommand contains a username or password, I suggest you remove it before posting.umounting then the drive has NOT beenumounted in the first place!ls /mnt/smb/should work (at least as root!). Oh, and please move the output into your question so that it can be formatted correctly.php?, and (b) if you can, then please test the mount command again and let us know.