Save file to CIFS share not working - linux gvfs

5 views (last 30 days)
Hello-
We can not save files to a CIFS file share, but we can Save As and create new files. Subsequent saves do not work.
Our users mount a CIFS share using gvfs. The mount point is under /run/user/uid/gvfs/mount_share_path. We run Matlab2014b.
Screen Shot 2019-09-04 at 11.05.18 AM.png
Screen Shot 2019-09-04 at 11.05.47 AM.png
  1 Comment
Wilson González Vanegas
Wilson González Vanegas on 30 May 2020
I have exactly the same problem on Ubuntu 20.04 and MATLAB R2020a. Did you find a solution?

Sign in to comment.

Answers (2)

Paulo Baptista
Paulo Baptista on 4 Sep 2019
I've tested this with Matlab 2016b and it has the same issue. I also mounted the CIFS mount via fstab to a directory, versus gvfs mount, and the occurs there too.

Snehal
Snehal on 23 Apr 2025
Hi,
CIFS shares can have complex permission and ownership semantics, especially when accessed from Linux.
My assumption is that “Save As” and ‘Creating new files’ works fine in your case because you are able to create a new file with the correct ownership. However, you are not able to save files that you do not own.
For the above mentioned issue, you can follow these steps as workaround:
1. Navigate to the concerned directory
2. Check with the following command to see who owns the file:
ls -l
% If it is not your user(like nobody or root), then this is likely the problem %
If you yourself are running as “root” then you are supposed to be denied write access as a security measure. Please refer to this MATLAB Answer thread for more context :
3. If the shared folder was originally configured with Unix-Style ACLs, creating a new dataset with Windows style ACLs and allowing full access for everyone might work (this can resolve ownership/permission mismatches when saving files)
% Use setfacl command to grant full access to everyone or to your user %
setfacl -m everyone@:rwxpDdaARWcCos:fd----:allow share-new/
Please refer to this MATLAB Answer thread for more context:
4. Finally, while accessing CIFS file share, I recommend not to open MATLAB with “sudo” access.
Hope this helps!

Categories

Find more on App Building in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!