I have an
ubuntu 16.04.2 server on my
virtualbox and want to share the folders from ubuntu to my
windows 10 host os. the sharing works fine but here is my problem.
I have one user on ubuntu lets call it
"John" that is my login user on ubuntu. I also have a
John user on my Windows 10 that is my main login user and it is administrator.
when I share for example
/var/www/html on ubuntu, I can access it from windows by typing the ubuntu ip like
\\192.168.56.1 in windows explorer and can visit the files and folders in that directory.
The problem is I cant create a file in that directory.
so I changed the ownership of the directory to John user and forced the samba shared folder to that user by adding force
user = John in
smb.conf on samba.
at this point I can add files and folders to the shared folder from windows BUT
if I create another folder in this directory (like
mkdir /var/www/html/NewFolder) from ubuntu
John user, I cant write or create a file in that
NewFolder from windows, but I can do so in its parent (
/var/www/html) directory that the user is its owner.
so short version of My question is: How can add full permission to a samba shared folder for its current AND future files and folders to a user or user group or all users that access it on the network. there is a apache server on this ubuntu that should access the files and folders with full permissions like 777 or 755 too. so I can't do this just for a single user I should be able to do it for any user i want.
so thats it! please help. I am a totally new user to ubuntu and want to learn this kind of things.
any helpful advice or solutions would be highly appreciated.