How to set file permissions

JeffHu's picture

Hi,

I am using Wise for Windows installer 6.4.  I am trying to create a file in the All Users directory and would like to give that file full permissions for Everybody.  Does anybody know if that is possible and how I would go about doing that?  Thank you.

B_Raj's picture

cacls

This is a strange issue that in  ALLUSERS profiles user's don't have write access.Either moving the component to USERSPROFILE  (if possible) or applying permission using CACLS can resolve the issue.But I doubt whether its a best practice.

A custom action is required to call CACLS to execute. CACLS will help to set a permission for a file.
To get more information type in CACLS  /? in command prompt.

I suggest you to run ' processmon' to find which folders inheritance is deneying the access.

VBScab's picture

If you must set permissions -

If you must set permissions - and I agree that you have a permissions issue if that is necessary in this case - use SetACL instead. The reason is that it can permission the registry as well as the file system, meaning you only need to use one tool for permissioning.

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

nac's picture

Google

File permissions forum doesnt sound good there are many options to give permissions. as VBScab says, think about using http://www.google.com before posting.  Anyways get a proper process to set permissions using any tool you are suitable with then add a custom action to perform that process.

I dont know how IMPOSEBLE spells

JeffHu's picture

Thanks for the replies.  I

Thanks for the replies.  I will try some of your suggestions if I cannot find another way.  My hope was that this function was available in the Wise app and I was just not finding it.  I want to minimize the amount of CAs in my installs as much as possible.

Nac, my first step is to always search google.  I guess I was more looking for a way to do it within the Wise App and that is why nothing turned up.  Thanks for the suggestion though.

nac's picture

no offence mate

Yes permissions can be given with wise also, with the help of LockPermissions table. you can check for this.

I dont know how IMPOSEBLE spells

VBScab's picture

>Yes permissions can be given

>Yes permissions can be given with wise also, with the help of LockPermissions table

The reason why I almost never mention the LockPermissions table, particularly for newcomers, is that it's such a bear to use (in that you need to use SIDs instead of user/group names) and that it isn't additive, i.e. you need to explicitly add all users and/or groups which require permissions, whereas the tools suggested can be used to add those users and/or groups.

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

EdT's picture

Lockpermissions may be adequate for this requirement

Since the intention is to apply full permissions for everyone, the lockpermissions table may be adequate.

You need to add a create folder action for the folder you wish to set permissions for - it doesn't matter if the folder exists or not.

Then using the permissions menu, you need to appreciate that Lockpermissions removes all existing permissions when it applies your permissions, so you need to set the following:

Administrators - select all the permission options to give full permissions - leave the domain field blank.
Users - select all the permission options to give full permissions - leave the domain field blank.

(There is no support for the group "Everyone", so don't bother trying to set that in the Lockpermissions table)

I cannot recall whether the permissions set this way are inherited all the way down the ALL Users profile, but worst case you can set the permissions individually for all the standard subfolders too.

Overall, it's a damn site easier using CACLS or SetACL for permissioning but if you want to avoid the extra custom action, then Lockpermissions is there for you to struggle with.....
 

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

DPS_Ltd's picture

Util

Use Secedit with well known SIDs

EdT's picture

Does Everyone have a well known SID?

Secedit is OK where the SIDS are not prone to change, but for any domain resources, the SID values will change if a group is deleted and recreated, for example.
The controlling INF file can be generated using the security snap-in in the mmc

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.