Mount shared folders in CentOS are assigned to specified users.

Source: Internet
Author: User
1. first, in the Windows 7 shared folder, set account permissions 2. test whether shared folders can be accessed. 3. install cifs or smtfs in linux. you can find the full name of the package in yumsearchcifs and install the package. 4. I used cifs to go to moun, so I only installed the cifs-utils.x86_645. use the mount command:

1. first, in the windows 7 shared folder, set account permissions

2. test whether shared folders can be accessed.

3. install cifs or smtfs in linux. you can find the full name of the package in yum search cifs and install the package.

4. I used cifs to go to moun, so only the cifs-utils.x86_64 is installed

5. run the mount command:

 

[Plain]View plaincopy
  1. Sudo mount-t cifs // pc machine name/Templates/mnt/Templates/-o username = jack

 

After the mount is successful, you can use root or sudo to access the folder for read/write (the prerequisite is shared folder, and the read/write permission has been set) 

 

6. if you want to assign the read/write permission to a specified linux user, you need to add two parameters.

 

[Plain]View plaincopy
  1. Sudo mount-t cifs // pc machine name/Templates/mnt/Templates/-o username = jack, gid = 501, uid = 501

After mounting is successful, you can use the specified user to read and write data.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.