How To Change CIFS Share Mount Permissions Linux
Change CIFS Share Mount Permissions Linux
Using below command you can mount CIFS Share to Linux but user should have write access to share.
Permissions of mount point would be below
as shown above mount point can’t access writable to other users, root user can only write the data to it.
Oops something went wrong. I need to access mount point data using other Linux user even if i mount using root user. How.?
Using chown on a mounted CIFS share will not work. The command will execute successfully even after no ownership will change. Ownership can only be assigned at mount time. Be ready to UN-mount the share you wish to change ownership
Mount CIFS share again with proper UID and GID
- UserName = muthu is windows admin user name
- dir_mode = Directory permissions as 0777 (Full permissions)
- file_mode = File Permissions as 0777 (Full Permissions)
- uid = User Identification Number of Linux user (In this case my Linux UID is 920)
- gid = Primary group id of Linux user
After mount with uid and gid above is the results
Mount CIFS Share as Permanent
To mount CIFS share as permanent, we have to add entry into FSTAB file as mentioned below
That’s it. Now Linux user can write and data to CIFS share and same data can be accessed and writable to windows user.