Very new to Linux. I try to mount the folder from my work server. Installed CIFS Utils pkg. Created the folder inside /home/documents Then I use

Sudo mount -t cifs -0 user=user, //ServerIP/share /home/user/documents/share

The mount is done, I can see the folders and files, but only as read only. If I check permissions for my /home/documents/share folder I see that the owner is root and only root has read-write access. The problem is I work with this share with some Cad program using wine and it doesn't have the root access. What am I doing wrong? Thanks.

  • sudo mount -t cifs -o rw,user=user //ServerIP/share /home/user/documents/share. – ajgringo619 Jan 18 '20 at 0:29
  • Doesn't work. Still read only. – Shualik Jan 18 '20 at 8:31
  • Are you certain that the share is exported as read/write? – ajgringo619 Jan 18 '20 at 16:04

ajgringo619 corrected your sytax. The only thing remaining is to take possession of the mounted share with a uid=user:

sudo mount -t cifs -o rw,user=user,uid=user //ServerIP/share /home/user/documents/share

The user in user=user is the user name you pass to the server as credentials. The user in uid=user is the user name on the client that is mounting the share.

CIFS is a virtual filesystem. When you mount a share on the client it creates a "view" of the remote share on the client and by default sets the owner to root since he is the one mounting it. uid=user replaces root as the owner of the mounted share with "user".

EDIT: BTW, how do I enable access to everyone?

sudo mount -t cifs -o rw,user=user,uid=user,nounix,dir_mode=0777,file_mode=0777 //ServerIP/share /home/user/documents/share
  • That worked, thanks. I have read/write access with nautilus and I guess any other linux app. However I need to use CAD program which is available only for Windows with wine and for the some reason it doesn't have read/write access for the mounted share. It does have read/write access for the home directory. Any suggestions? – Shualik Jan 19 '20 at 0:09
  • Another thing that I wanted to ask. Is there any database of terminal commands like this uid=user that I had no idea about? – Shualik Jan 19 '20 at 11:28
  • I know nothing about wine. Does the CAD program not see the mount point at all or does it only have read access. We can change how the share mounts to allow write access to everyone if that is what CAD requires. As far as the list of options see the output of "man mount.cifs" – Morbius1 Jan 19 '20 at 14:07
  • Ok, I was mistaken. This the very strange thing. Turned out that the Catia (my CAD program) does have the read/write access to the share, I could make save as but only if I save model at not native format. It's only it's native format that it refuses to save. But if I make save us to the home folder, no problem at all. I guess I have to work at my home computer and just synchronize folders with the work server. Anyway, your solution worked, thanks a lot. BTW, how do I enable access to everyone? – Shualik Jan 19 '20 at 23:10
  • Please see my edit above for your last question. – Morbius1 Jan 20 '20 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.