Save file to CIFS share not working - linux gvfs

5 次查看(过去 30 天)
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

回答(2 个)

Paulo Baptista
Paulo Baptista 2019-9-4
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 2025-4-23
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!

类别

Help CenterFile Exchange 中查找有关 App Building 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by