Change File Permission of File Created on a Unix System

9 Ansichten (letzte 30 Tage)
Ruger28
Ruger28 am 14 Mai 2021
Kommentiert: Walter Roberson am 15 Mai 2021
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 Kommentar
Walter Roberson
Walter Roberson am 15 Mai 2021
What kind of shared filesystem is being used?
... Or is this a dual-boot situation?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Jan
Jan am 14 Mai 2021
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 Kommentare
Jan
Jan am 14 Mai 2021
Please explain, what "Windows cannot modify the file" exactly means.
Ruger28
Ruger28 am 15 Mai 2021
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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Produkte


Version

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by