Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inno Setup - How to set full permission on a folder, not just for it's contents

My kit created with Inno Setup installs my application in C:\Program Files\MyApp.

When my application starts, it tries to create new log files in C:\Program Files\MyApp\logs\ but it fails.

In my Inno script i have the following settings:

[Dirs]
Name: "{app}";

[Files]
Source: logs\*; DestDir: {app}\logs\; Flags: ignoreversion recursesubdirs createallsubdirs; Permissions: everyone-full

This gives full permissions on all files inside logs folder, but not on the folder itself. So, when my application tries to create a new log file inside that folder, it fails.

How can i set full permissions on the folder as well, not only on the existing files in it?

like image 387
Cornelia Avatar asked Jul 11 '13 14:07

Cornelia


People also ask

How do I give permission to a folder and subfolders?

Use chmod -R 755 /opt/lampp/htdocs if you want to change permissions of all files and directories at once. Use find /opt/lampp/htdocs -type d -exec chmod 755 {} \; if the number of files you are using is very large.

How do I give permission to a folder in CentOS?

In addition, CentOS can manage file and folder permissions types by group. You can change file or folder permissions on computers running CentOS using the CHMOD terminal command or by using the Nautilus file manager.


Video Answer


1 Answers

Setting permissions for logs folder under [Dirs] section worked for me:

[Dirs]
Name: "{app}"; 
Name: "{app}\logs"; Permissions: everyone-full

[Files]
Source: logs\*; DestDir: {app}\logs\; Flags: ignoreversion recursesubdirs createallsubdirs; Permissions: everyone-full

But, as in this post, i'm not sure if it's the proper way to do it.

like image 67
Cornelia Avatar answered Oct 10 '22 17:10

Cornelia