Sign in to follow this  
Followers 0
craigholohan

File Security Permissions

8 posts in this topic

Hi,

Another question, I need to add security permissions to 3 .ini files that I am using.

Basically with my install file I and using, below example:

FileInstall ( "C:\Temp\myApp\MyINI1.ini", $Inst_Message & "\MyINI1.ini",1)

FileInstall ( "C:\Temp\myApp\MyINI2.ini", $Inst_Message & "\MyINI2.ini",1)

FileInstall ( "C:\Temp\myApp\MyINI3.ini", $Inst_Message & "\MyINI3.ini",1)

The files are installing fine but they only seem to have "Read" access for user, I want the user to have full control, and what would be even better is if I can add everyone to have full control to these 3 .ini files.

I have tried the:

_FileCreate($Inst_Message &"\MyINI1.ini")

FileSetAttrib($Inst_Message &"\MyINI1.ini", "-RASHNOT")

With a number of diffrent combinations of the RASHNOT Attribute.

Please can someone point me in the right direction as I think I am barking up the wrong tree.

Thanks,

Craig

Share this post


Link to post
Share on other sites



Hi,

Another question, I need to add security permissions to 3 .ini files that I am using.

Basically with my install file I and using, below example:

FileInstall ( "C:\Temp\myApp\MyINI1.ini", $Inst_Message & "\MyINI1.ini",1)

FileInstall ( "C:\Temp\myApp\MyINI2.ini", $Inst_Message & "\MyINI2.ini",1)

FileInstall ( "C:\Temp\myApp\MyINI3.ini", $Inst_Message & "\MyINI3.ini",1)

The files are installing fine but they only seem to have "Read" access for user, I want the user to have full control, and what would be even better is if I can add everyone to have full control to these 3 .ini files.

I have tried the:

_FileCreate($Inst_Message &"\MyINI1.ini")

FileSetAttrib($Inst_Message &"\MyINI1.ini", "-RASHNOT")

With a number of diffrent combinations of the RASHNOT Attribute.

Please can someone point me in the right direction as I think I am barking up the wrong tree.

Thanks,

Craig

Do you mean the Read-Only Attribute or actual Security settings ?

File security can be changed by running CACLS, but you will require the rights to update it


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Do you mean the Read-Only Attribute or actual Security settings ?

File security can be changed by running CACLS, but you will require the rights to update it

The actual security settings, what if I use the RunAsSet() after the file have been extracted, then use the CACLS.

Share this post


Link to post
Share on other sites

I assume you are running under WinXP Pro or a Server.

The attributes are inherited from those of c:\Temp\myapp.

So you need to set the ones you want so that your users can have the right ones :whistle:

Share this post


Link to post
Share on other sites

The actual security settings, what if I use the RunAsSet() after the file have been extracted, then use the CACLS.

Thats what i would do if it need changing ..

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Thats what i would do if it need changing ..

Thanks Guys,

I will try the RunAsSet() and then the CACLS.

JPM, yes I am using XP Pro and Server 2003,

So what you are saying is if I use the RunAsSet() and give the full controle access to the folder I extract all my files into then all the files/folders in that folder will have full controle? Am I right at saying that?

Thanks again,

Craig

Share this post


Link to post
Share on other sites

Thanks Guys,

I will try the RunAsSet() and then the CACLS.

JPM, yes I am using XP Pro and Server 2003,

So what you are saying is if I use the RunAsSet() and give the full controle access to the folder I extract all my files into then all the files/folders in that folder will have full controle? Am I right at saying that?

Thanks again,

Craig

The file permissions are inherited from the directory.....


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

The file permissions are inherited from the directory.....

Ok thanks Guys,

I am going to see how far I can get on this.

Cheers,

Craig

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0