boost::filesystem and writing to Windows programdata structure

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

boost::filesystem and writing to Windows programdata structure

Boost - Users mailing list

Hi,

 

I’ve an application that has been working fine under Windows 7, but I’m now fixing up for running on later Windows versions. I’ve been hitting unhandled exceptions when writing to c:\programdata\(my company)\(my app name)\ and understand that this is due to the permissions for such folders being more restrictive on Windows 8, 8.1 and 10.

 

My research seems to indicate that I can modify my installer to set up my folders with appropriate permissions at install-time, but I’d prefer to use boost::filesystem to check folder/file permissions then change them at run-time, if necessary using appropriate csidl values.

 

Can anybody offer any advice, please?  

 

Best wishes.

 

Tim Burgess

 


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: boost::filesystem and writing to Windows programdata structure

Boost - Users mailing list

If the application doesn't have write permission for a folder at run-time, why do you expect that it has the permission to change the permission on the folder? (Modifying the DACL of an object is also a separate permission.)



From: Boost-users <[hidden email]> on behalf of Tim Burgess via Boost-users <[hidden email]>
Sent: Thursday, October 12, 2017 11:14:26 AM
To: 'boost-users list'
Cc: Tim Burgess
Subject: [Boost-users] boost::filesystem and writing to Windows programdata structure
 

Hi,

 

I’ve an application that has been working fine under Windows 7, but I’m now fixing up for running on later Windows versions. I’ve been hitting unhandled exceptions when writing to c:\programdata\(my company)\(my app name)\ and understand that this is due to the permissions for such folders being more restrictive on Windows 8, 8.1 and 10.

 

My research seems to indicate that I can modify my installer to set up my folders with appropriate permissions at install-time, but I’d prefer to use boost::filesystem to check folder/file permissions then change them at run-time, if necessary using appropriate csidl values.

 

Can anybody offer any advice, please?  

 

Best wishes.

 

Tim Burgess

 


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: boost::filesystem and writing to Windows programdata structure

Boost - Users mailing list
On 12.10.2017 11:20, Stian Zeljko Vrba via Boost-users wrote:

If the application doesn't have write permission for a folder at run-time, why do you expect that it has the permission to change the permission on the folder? (Modifying the DACL of an object is also a separate permission.)


It kinda could have, I suppose, still automatically changing permissions on folder to facilitate requested write/create/modify would go very much against my expectations.

As for the original question, creating appropriate folder structure with installer would imo be a proper way to go.

Cheers,
Leon


From: Boost-users [hidden email] on behalf of Tim Burgess via Boost-users [hidden email]
Sent: Thursday, October 12, 2017 11:14:26 AM
To: 'boost-users list'
Cc: Tim Burgess
Subject: [Boost-users] boost::filesystem and writing to Windows programdata structure
 

Hi,

 

I’ve an application that has been working fine under Windows 7, but I’m now fixing up for running on later Windows versions. I’ve been hitting unhandled exceptions when writing to c:\programdata\(my company)\(my app name)\ and understand that this is due to the permissions for such folders being more restrictive on Windows 8, 8.1 and 10.

 

My research seems to indicate that I can modify my installer to set up my folders with appropriate permissions at install-time, but I’d prefer to use boost::filesystem to check folder/file permissions then change them at run-time, if necessary using appropriate csidl values.

 

Can anybody offer any advice, please?  

 

Best wishes.

 

Tim Burgess

 



_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users



_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: boost::filesystem and writing to Windows programdata structure

Boost - Users mailing list

Leon,

 

Thanks for the comments. It’s been a useful learning experience anyway – I’m a good deal wiser and only a little older and that’s always a winnerJ

 

Best wishes.

 

Tim Burgess

 

From: Boost-users [mailto:[hidden email]] On Behalf Of Leon Mlakar via Boost-users
Sent: 12 October 2017 12:51
To: Stian Zeljko Vrba via Boost-users <[hidden email]>
Cc: Leon Mlakar <[hidden email]>
Subject: Re: [Boost-users] boost::filesystem and writing to Windows programdata structure

 

On 12.10.2017 11:20, Stian Zeljko Vrba via Boost-users wrote:

If the application doesn't have write permission for a folder at run-time, why do you expect that it has the permission to change the permission on the folder? (Modifying the DACL of an object is also a separate permission.)

 

It kinda could have, I suppose, still automatically changing permissions on folder to facilitate requested write/create/modify would go very much against my expectations.

As for the original question, creating appropriate folder structure with installer would imo be a proper way to go.

Cheers,
Leon


From: Boost-users [hidden email] on behalf of Tim Burgess via Boost-users [hidden email]
Sent: Thursday, October 12, 2017 11:14:26 AM
To: 'boost-users list'
Cc: Tim Burgess
Subject: [Boost-users] boost::filesystem and writing to Windows programdata structure

 

Hi,

 

I’ve an application that has been working fine under Windows 7, but I’m now fixing up for running on later Windows versions. I’ve been hitting unhandled exceptions when writing to c:\programdata\(my company)\(my app name)\ and understand that this is due to the permissions for such folders being more restrictive on Windows 8, 8.1 and 10.

 

My research seems to indicate that I can modify my installer to set up my folders with appropriate permissions at install-time, but I’d prefer to use boost::filesystem to check folder/file permissions then change them at run-time, if necessary using appropriate csidl values.

 

Can anybody offer any advice, please?  

 

Best wishes.

 

Tim Burgess

 




_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

 


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: boost::filesystem and writing to Windows programdata structure

Boost - Users mailing list
In reply to this post by Boost - Users mailing list
> My research seems to indicate that I can modify my installer to set up
> my folders with appropriate permissions at install-time, but I’d prefer
> to use boost::filesystem to check folder/file permissions then change
> them at run-time, if necessary using appropriate csidl values.

Filesystem only supports the POSIX access permissions model when running
on POSIX. It does not support ACLs, nor permissions at all on Windows.

Niall

--
ned Productions Limited Consulting
http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: boost::filesystem and writing to Windows programdata structure

Boost - Users mailing list
Niall,

OK, that is the final nail in the app-based fix idea. Thanks for the information.

Best wishes.

Tim Burgess

-----Original Message-----
From: Boost-users [mailto:[hidden email]] On Behalf Of Niall Douglas via Boost-users
Sent: 12 October 2017 13:25
To: [hidden email]
Cc: Niall Douglas <[hidden email]>
Subject: Re: [Boost-users] boost::filesystem and writing to Windows programdata structure

> My research seems to indicate that I can modify my installer to set up
> my folders with appropriate permissions at install-time, but I’d
> prefer to use boost::filesystem to check folder/file permissions then
> change them at run-time, if necessary using appropriate csidl values.

Filesystem only supports the POSIX access permissions model when running on POSIX. It does not support ACLs, nor permissions at all on Windows.

Niall

--
ned Productions Limited Consulting
http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users