I need vmhgfs to be accessible to both root user and the www-data user.
As root, I run the
vmhgfs-fuse .host:/ /mnt/hgfs/ command in rc.local
However, the webserver is unable to read the shared folder. So I checked its permission,
www-data@ubuntu16:~$ ls /mnt/ -lh ls: cannot access '/mnt/hgfs': Permission denied total 0 d????????? ? ? ? ? ? hgfs www-data@ubuntu16:~$
(The permission if /mnt is 777)
I don't know what's happening. Looks like a kernel issue. It never happened in Ubuntu 14.04, now in 16.04 and kernel
4.4.0-21-generic, it became so.
P.S If I mount the hgfs with
www-data account, it's then accessible by
www-data, but not by root user.