Ubuntu share folder with Windows
To share a folder in debian or ubuntu you need to do the following:
1. Open the commandline
2. Enter the following:
1 |
net usershare add webroot /var/www "webroot" everyone:F guest_ok=y |
* Webroot is the sharename
* /var/www is the source path
* “webroot” is a comment for the new share
* everyone:F is a ACL that gives everybody full control
* guest_ok=y will allow guest access. If you want only authenticated useres then change that to guest_ok=n”
3. The only thing left to do is change the permissions on the target directory to allow “guests” to actually write to that share:
1 |
chmod 0777 /var/www |
Troubleshooting
To verify the share definition:
1 |
net usershare info |
To delete the share:
1 |
net usershare delete webroot |
Leave a Reply