has been in the Linux development recently, the insight is long, but the efficiency is still not up, so find ways to combine the advantages of Windows and Linux. linux do server far better than Windows, the program is still running under Linux, and the service program in Linux and window under the speed difference between the big, run apache+mysql+php can see the obvious gap, the same machine, I run a Linux virtual machine under Windows apache+mysql+php is much faster than running apache+mysql+php directly under native windows, but if you write a program, Windows is faster. mounts are very common in Linux, and it's natural to think of a shared directory that mounts Windows under Linux to make Windows and Linux work together effectively. First, set up the shared directory in Windows. Assume that the shared directory access path is://192.168.10.1/project and then, after you configure the virtual machine host-only Internet mode, install SMB. [[email protected] ~] Yum install smb install SMB, you can mount the Windows shared directory [[email protected] ~] Mount//192.168.10.1/project/var/www/html/project-o username=admin,password=123456 is simply mounted, and the Apache engineering path is converted to this /var/www/html/project, moving the item to//192.168.10.1/project appears to be working, but if the project uses write permissions, it throws a lot of permission deny ... after one side of the toss, and finally suddenly understand the Linux mount command mount is how to give users permission. [[email protected] ~] Mount//192.168.10.1/project/var/www/html/project-o rw,username=admin, password=123456 plus rw This parameter, or fmask,dmask specify permissions, DMAsK is the mask,fmask of the directory is the mask of the file, mask is a permission mask, composed of 3 octal digits, the current access rights to remove the permissions represented by the permission mask, you can create a file when the default permissions. The first one represents the permissions that you access, the second represents the permissions for the same group access, and the third represents the permissions for everyone else to access. But this still does not work, and if you do not specify Apache users, it will be invalid. [[email protected] ~] ID apache uid=48 (apache) gid=48 (Apache) groups=48 (Apache) [[email protected] ~] Mount//192.168.10.1/project/var/www/html/project-o rw,uid=48,gid=48,username=admin,password= 123456 so read and write permission is no problem, try oh .... In fact, there are some problems in the middle, for example, because mount is always a privilege problem, need to umount that directory, the problem comes out, always appear device is busy think it might be Apache is using this directory, [[email protected] ~] Service httpd stop [[email protected] ~] fuser-v/var/www/html/project See who else is using this directory, if only you are in use, kill off, Fuser bring kill [[email protected] ~] Fuser-k/var/www/html/project By this toss, consciously and long insight, suddenly think of a netizen saying: Life is tossing! reprinted from:http://1300hong.blog.163.com/blog/static/22545921201223091112544/ Before you resolve the issue of mount access through this article:
Mount-t Cifs-o username=administrator,password=123456//192.168.61.181/work/mnt/work
After:
Mount-t Cifs-o rw,uid=501,gid=501,username=administrator,password=123456//192.168.61.181/work/mnt/work
Where WWW users are following the Linux hook Windows file sharing method
The core of Windows network sharing is smb/cifs, where you have to install and use the Samba package if you want to mount a disk share for Windows on Linux. The vast majority of popular Linux distributions now include the Samba package, if the Linux system is installed
If Samba is not installed, first install Samba. Of course, you can also download the www.samba.org website ... The new version is 3.0.10 version.
When the Windows system share is set up, you can hook up (mount) on the Linux client, with the following details:
# Mkdir–p/mnt/samba
Note: Create a directory to use as a mount point
# mount-t Smbfs-o username=administrator,password=pldy123//10.140.133.23/c$/mnt/samba
Mount-t Cifs-o (rw,uid=501,gid=501, optional, troubleshooting access issues) username=administrator,password=123456//192.168.1.26/work/mnt/ Work (note: To set the password for Windows first, and then set to a shared directory, configure the Read and write permissions)
Note: Administrator and pldy123 are a user name and password for the IP address of the 10.140.133.23 Windows computer, and C $ is a disk share on this computer
This allows you to access the files on the Windows system disk via/mnt/samba on your Linux system. The above operations are in Redhat as Server 3, Redflag Server 4.1, SuSE Server 9, and Windows NT 4.0, Windows 2000,
Test passes under Windows XP, Windows 2003 environments.
Delete mount point: umount/mnt/work
Mount Mount permissions Issue