Save file to CIFS share not working - linux gvfs
5 views (last 30 days)
Show older comments
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.


1 Comment
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?
Answers (2)
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!
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!