Common Internet File System(CISF) is file sharing network protocol mainly used to provide shared access to files, printers, serial ports, and miscellaneous communications between nodes on a network. You can easily access CIFS share from Linux and mount them as a regular filesystem.
Examples:-
#mount -t cifs -o username=shareuser,password=sharepassword //server-IP/share-name /mnt/cifs
With domain:- Set the domain or work group of user
#mount -t cifs //server-IP/share-name /mnt/cifs -o username=shareuser,password=sharepassword,domain=xxxx.com
By default windows share will mount with full permission as 777 in Linux server.To change default access use dir_mode and file_mode to set the limited permission on directory and file.
To make the mount persistent across reboots, make the below entry to the /etc/fstab
#vi /etc/fstab
//server-IP/share-name /mnt/cifs cifs _netdev,username=<share user>,password=<share password>,dir_mode=0755,file_mode=0755 0 0
Check the mounted FS.
#df -h
No comments:
Post a Comment
Thanks for reading till end. I hope this will help you more to improve your knowledge.
Now it's your turn!
What do you think? Share your experience in the comments box and subscribe for more interesting post.