Change File Permission of File Created on a Unix System

조회 수: 15 (최근 30일)
Ruger28
Ruger28 2021년 5월 14일
댓글: Walter Roberson 2021년 5월 15일
Hello all,
A file I am generating in MATLAB in Unix is being created with write permission to all users, but when I try to view the file on Windows, it is Read-Only.
TemplateFile = 'MyTemplate.pptx';
NewFile = 'MyNewFile.pptx';
copyfile(TemplateFile,NewFile,'f');
fileattrib(NewFile,'+w'); % set write access.
The file is generated without issue, but when I try to modify it on a windows machine, it will not let me. I have tried adding a user to the fielattrib command, but it has not been successful.
Any help is greatly appreciated!
  댓글 수: 1
Walter Roberson
Walter Roberson 2021년 5월 15일
What kind of shared filesystem is being used?
... Or is this a dual-boot situation?

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

답변 (1개)

Jan
Jan 2021년 5월 14일
Does your Windows account has write permissions in the folder?
Which error message do you see in which program? Maybe the file is password protected and the access limitation is not a problem of the file system.
  댓글 수: 3
Jan
Jan 2021년 5월 14일
Please explain, what "Windows cannot modify the file" exactly means.
Ruger28
Ruger28 2021년 5월 15일
The file is read only, and matlab cannot modify it. I cant even delete it becaue it is read only and created on a unix system.

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

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

제품


릴리스

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by