This project has moved and is read-only. For the latest updates, please go here.

Folder Permissions

Jan 21, 2013 at 1:26 PM

Hello,

This issue has been bugging me for ages and I can't work it out.

Everytime MCE Buddy converts a file, and creates a new folder and file into my destination directory, the security permission owner is always set to administrator. This means I cannot view the files from my andoid phone unless I manually change the owner to "everyone" on my PC.

The destination folder is set to everyone and the owner is everyone, and so is the temp working directory. I even changed the owner to everyone on the program file folder where MCE Buddy is installed. Yet still when the conversion is done, the new folder and file is set to administrator as the owner.

Please help.

Jan 21, 2013 at 4:23 PM

1. Set the owner  to your login

2. Check the permissions of the target folder, it should be set to inherit permissions from parent folder, on parent folder ensure you have full access

 

I've seen this issue before, by default everything works fine. When folks have messed around with ownership and parent folder permissions eveything gets messed up.

Marked as answer by rboy1 on 8/24/2014 at 7:12 AM
Jan 22, 2013 at 12:53 PM

Can't believe it was that easy!!

Worked perfectly.

Thankyou so much.

Aug 23, 2014 at 2:45 PM
rboy1 wrote:
  1. Set the owner  to your login 2. Check the permissions of the target folder, it should be set to inherit permissions from parent folder, on parent folder ensure you have full access   I've seen this issue before, by default everything works fine. When folks have messed around with ownership and parent folder permissions eveything gets messed up.
First, thanks for a great program. I tried an earlier version, but was not too happy about how much handbrake bogged down the system. Just joined Early Access & really like the hardware encoding available now. The issue of file permissions was also one that bugged me before, and it’s still there. Yes, I DID change the permissions of the parent folder, and it is not owned by the user logged in. This is because I want anyone on the HTPC to be able to add files to a folder, but not delete them too easily (even the ones they added). When MCEBuddy creates the folders for Showname & Season, the permissions are inherited correctly from the parent. However, they are not inherited correctly for the video file. Instead of permissions for Authenticated Users, SYSTEM, Administrators, NETWORK, and Everyone, The video file has permissions for SYSTEM, Administrators, and Users. This prevents access to the file on my home network. I’m not sure why “Users” is even there, as I do not have that set up in the parent. The result is I have to re-propagate permissions from the parent down to be able to open videos from another PC on the network. Perms are working fine for files created by MediaBrowser alongside the videos after it sees them added, so I know it CAN work the way I expect it to. Can this be looked into? Thanks.
Aug 23, 2014 at 3:14 PM
Unfortunately this isn't an MCEBuddy issue. It's a windows configuration issue. MCEBuddy does not set, change or modify permissions in anyway, it just use API's to create folders and move files. The rest is all Windows.

You should really find out why Windows is creating folders without inheriting permissions from the parent folder. If you do a clean install of Windows, this issue won't exist, so the best bet is to get the root cause of how/why the windows settings changed.


Aug 23, 2014 at 7:18 PM
Edited Aug 23, 2014 at 7:33 PM
Thanks. The Create Folder call seems to work fine, but the move of the AVI file does not. That tells me you are moving the file from a temp folder (I didn't look yet), in which case I think by design it will NOT automatically set its perms to the inheritance rules of the new folder. Since the AVI file is owned by Administrators, I assume you are doing the conversion with elevated permissions. Have you tried using GetNamedSecurityInfo and SetNamedSecurityInfo calls?
Aug 26, 2014 at 7:05 AM
Update on my issue with permissions. Solved! I was able to use the custom commands feature of MCEBuddy to run the ICACLS command utility after the completed file is moved to the destination directory. The /reset switch on ICACLS will replace permissions with the default inherited permissions. Since the folders created by MCEBuddy had correct permissions, and it was only a problem with the moved file keeping its original permissions (which is correct behavior for Windows), only the video file needed to be treated. Works perfect. Thanks for the flexibility in MCEBuddy!
Marked as answer by rboy1 on 8/26/2014 at 5:35 AM
Aug 26, 2014 at 1:35 PM
Good to hear, here's the except from Microsoft on file permission while moving/copying:
By default, an object inherits permissions from its parent object, either at the time of creation or when it is copied or moved to its parent folder. The only exception to this rule occurs when you move an object to a different folder on the same volume. In this case, the original permissions are retained.
Aug 26, 2014 at 1:54 PM
You've also given an interesting thought, with the next build of MCEBuddy once the file is moved to the destination folder, MCEBuddy will reset the permissions (since files moved from the same volume don't inherit destination folder permissions) after moving the file at the end of the conversion. This way it will always inherit the permissions of the destination folder
Marked as answer by rboy1 on 8/26/2014 at 5:55 AM
Aug 27, 2014 at 1:35 PM
Building it into MCEBuddy is not a bad idea, as I can imagine I (and the one before me) are not the only ones that will encounter this. The file will still end up being owned by Administrators, as the engine runs under SYSTEM. I guess if a user had a destination folder with perms only being granted to the file owner you'd see a posting here, but I'd put the chances at slim.

Thanks for a great program!