Save file to CIFS share not working - linux gvfs

조회 수: 6 (최근 30일)
Paulo Baptista
Paulo Baptista 2019년 9월 4일
답변: Snehal 2025년 4월 23일
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
Wilson González Vanegas
Wilson González Vanegas 2020년 5월 30일
I have exactly the same problem on Ubuntu 20.04 and MATLAB R2020a. Did you find a solution?

댓글을 달려면 로그인하십시오.

답변 (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