Results 1 to 2 of 2

Thread: File access and admin only privileges

  1. #1
    Join Date
    Mar 2014
    Location
    USA
    Posts
    85
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default File access and admin only privileges

    This isn't necessarily a Qt question, I'm just not sure where to ask this. I have a program. It needs to be able to read and write to a .csv file. I need to make it so that the user can't open the file with another program (like excel) unless they have admin privileges. Is there a way to do that? Something along the lines of the file requires admin privileges, the program has admin privileges, and the user doesn't have admin privileges.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: File access and admin only privileges

    Google for "Windows ACL". Using Access Control Lists might just turn out to be a hindrance, not a preventative. If a user has admin privileges, then you can't stop them from getting to a file. You can make it harder with ACL, making the file hidden, etc.

    But remember, the program that creates, writes, and reads the file must have those permissions as well and that could be harder than keeping the user out. You have to be able to install the program and get it those rights, so that's going to require admin rights at a minimum.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 2
    Last Post: 18th March 2016, 12:51
  2. Replies: 2
    Last Post: 18th October 2013, 19:16
  3. Application with admin privileges
    By kibic1987 in forum Newbie
    Replies: 1
    Last Post: 12th March 2013, 02:30
  4. Folder in admin account
    By mugi in forum Qt Programming
    Replies: 5
    Last Post: 13th September 2012, 11:52
  5. How to open folder and file in place with admin status
    By Momergil in forum Qt Programming
    Replies: 2
    Last Post: 19th December 2011, 11:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.