Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Looking for a script/method for replacing permissions on files

  • 05-07-2007 11:46am
    #1
    Closed Accounts Posts: 2,460 ✭✭✭


    Two of our departments are sharing some files at the moment. However sometimes a buyer may put in a file which is owned by them and therefore is not accessible to our marketing department.

    At the moment when I get a call about this problem I just log on and replace all permissions inside the folder to be owned by everyone. I would like this to be automated as it is a recurring problem.


Comments

  • Registered Users, Registered Users 2 Posts: 7,701 ✭✭✭GerardKeating


    Two of our departments are sharing some files at the moment. However sometimes a buyer may put in a file which is owned by them and therefore is not accessible to our marketing department.

    At the moment when I get a call about this problem I just log on and replace all permissions inside the folder to be owned by everyone. I would like this to be automated as it is a recurring problem.

    Have you looked at Windows PowerShell ?


  • Registered Users Posts: 36 declantm


    If you copy the following code into a new batch file (e.g. Permissions.bat) and execute it, that should do the trick
    @Echo off
    setlocal ENABLEEXTENSIONS
    
     REM Change the FolderName to point to the shared directory:
     set FolderName=c:\test
    
     REM Look for all files in all subfolders
     for /f "delims=" %%f in ('dir /a:-d /b /s "%FolderName%"') do @(
    
      REM edit the ACL for each file and grant Everyone change permissions.
      cacls "%%f" /E /G Everyone:C
    
     )
    endlocal
    

    You will need to change the FolderName variable to point to your shared folder name.
    e.g. if the files are kept in the "c:\Shared files" folder then change the text to "set FolderName=c:\Shared files"


  • Registered Users, Registered Users 2 Posts: 816 ✭✭✭Cryos


    Two of our departments are sharing some files at the moment. However sometimes a buyer may put in a file which is owned by them and therefore is not accessible to our marketing department.

    At the moment when I get a call about this problem I just log on and replace all permissions inside the folder to be owned by everyone. I would like this to be automated as it is a recurring problem.

    Hi workaccount,

    What you could do is the following on the Share (e.g \\fileserver\share)

    set the share permissions to Authenticated Users (change) & Domain Admins (full)

    Then under security depending on what way its set, add the 2 departments groups with change access and make sure all permissions thereafter are inheritable. This then means that anyfiles should be accessable by both departments.

    Be carefull if your in a scenaro where you dont want one department accessing anothers files. You may have to manually set inheritable permissions on child folders.


Advertisement