Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Hi I have a powershell script which takes some data and dumps into a logfile whenever its executed.The script resides in single location and shortcut is distributed to all.

I want to log the events on the script when its executed; How can i give the users only append access to the log file ; i dont want them deleting the logs; they only need to apped to that.

Please do let me know of any questions or clarifications.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You need to modify the NTFS permissions on the log file. You need to ensure that the "Create folders / append data" permission only is granted to the individuals or groups that you want to be able to only append to the log file. That setting is in the "Advanced" portion of the permissions on the file.

enter image description here

Also see: http://www.techrepublic.com/article/windows-101-know-the-basics-about-ntfs-permissions/6084446

Create Folders/Append Data: This Create Folders permission allows users to create folders within a folder. (This applies to folders only.) The Append Data permission allows users to make changes to the end of the file, but they can't change, delete, or overwrite existing data. (This applies to files only.)

share|improve this answer
    
Should the inheritence be disabled? –  Darktux Feb 8 '13 at 17:50
    
It doesn't need to be - permissions granted explicitly on a file will take precedence over inherited permissions. An explicit deny takes precedence over an inherited allow, an explicit allow takes precedence over an inherited deny, etc. –  Ryan Ries Feb 8 '13 at 17:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.