{"action":"created","issue":{"url":"https://api.github.com/repos/alphaleonis/AlphaFS/issues/309","repository_url":"https://api.github.com/repos/alphaleonis/AlphaFS","labels_url":"https://api.github.com/repos/alphaleonis/AlphaFS/issues/309/labels{/name}","comments_url":"https://api.github.com/repos/alphaleonis/AlphaFS/issues/309/comments","events_url":"https://api.github.com/repos/alphaleonis/AlphaFS/issues/309/events","html_url":"https://github.com/alphaleonis/AlphaFS/issues/309","id":210826930,"number":309,"title":"How to use backup semantics (seBackup privilege) over the network?","user":{"login":"roman-himmelreich-sp","id":15210068,"avatar_url":"https://avatars0.githubusercontent.com/u/15210068?v=3","gravatar_id":"","url":"https://api.github.com/users/roman-himmelreich-sp","html_url":"https://github.com/roman-himmelreich-sp","followers_url":"https://api.github.com/users/roman-himmelreich-sp/followers","following_url":"https://api.github.com/users/roman-himmelreich-sp/following{/other_user}","gists_url":"https://api.github.com/users/roman-himmelreich-sp/gists{/gist_id}","starred_url":"https://api.github.com/users/roman-himmelreich-sp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roman-himmelreich-sp/subscriptions","organizations_url":"https://api.github.com/users/roman-himmelreich-sp/orgs","repos_url":"https://api.github.com/users/roman-himmelreich-sp/repos","events_url":"https://api.github.com/users/roman-himmelreich-sp/events{/privacy}","received_events_url":"https://api.github.com/users/roman-himmelreich-sp/received_events","type":"User","site_admin":false},"labels":[{"id":166628553,"url":"https://api.github.com/repos/alphaleonis/AlphaFS/labels/Question","name":"Question","color":"cc317c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-28T15:53:04Z","updated_at":"2017-06-07T17:53:18Z","closed_at":null,"body":"I am trying to enumerate a directory on a remote file server. I want to use backup-semantics in order to not require administrator credentials.\r\n\r\nOn the test server, I have created a share:\r\n1. Share permissions: everyone full control\r\n2. NTFS permissions: only SYSTEM (I removed all others)\r\n\r\nI am currently using this code:\r\n\r\n`static void accessAsBackup() {\r\n\r\n            // enable privileges\r\n            using (new PrivilegeEnabler(Privilege.Backup)) {\r\n                try {\r\n                    Host.ConnectTo(@\"\\\\target-srv\\targetShare\",\r\n                                              @\"office\\backup_op_user\", \"**password**\",\r\n                                              false, false, false);\r\n                    \r\n                    List<FileIdBothDirectoryInfo> fsEntries = Directory.EnumerateFileIdBothDirectoryInfo(@\"\\\\target-srv\\targetShare\", FileShare.ReadWrite).ToList();\r\n                    Console.WriteLine(\"# of children: \" + fsEntries.Count);\r\n                }\r\n                catch (Exception ex) { }\r\n                finally {\r\n                    Host.DisconnectFrom(@\"\\\\target-srv\\targetShare\");\r\n                }\r\n            }\r\n        }`\r\n\r\nThis works if I specify \"DOMAIN\\Administrator\" in the username, but does not work (the error is 5 - access denied) if I try to use a domain account that is a member of the local \"Backup Operators\" on _target-srv_ server.\r\n\r\nI have also examined the security event log on _target-srv_, for every connection created with _Host.ConnectTo()_ a \"Special Logon\" event is written. The details of this event include the list of privileges that the logon account was given. In both cases (when I connect with administrator or with backup_op_user) - _seBackupPrivilege_ is indeed listed. I tried to give extra privileges to the \"Backup Operators\" so the list has all the privileges that the Administrator has - but it made no change.\r\n\r\nQuestions:\r\n1. What is the right way to use Backup-Semantics over the network?\r\n2. How come it works with Administrator and not with a member of \"Backup Operators\" - are there additional implicit permissions for the Admin?"},"comment":{"url":"https://api.github.com/repos/alphaleonis/AlphaFS/issues/comments/306873847","html_url":"https://github.com/alphaleonis/AlphaFS/issues/309#issuecomment-306873847","issue_url":"https://api.github.com/repos/alphaleonis/AlphaFS/issues/309","id":306873847,"user":{"login":"mrducks","id":8704573,"avatar_url":"https://avatars1.githubusercontent.com/u/8704573?v=3","gravatar_id":"","url":"https://api.github.com/users/mrducks","html_url":"https://github.com/mrducks","followers_url":"https://api.github.com/users/mrducks/followers","following_url":"https://api.github.com/users/mrducks/following{/other_user}","gists_url":"https://api.github.com/users/mrducks/gists{/gist_id}","starred_url":"https://api.github.com/users/mrducks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrducks/subscriptions","organizations_url":"https://api.github.com/users/mrducks/orgs","repos_url":"https://api.github.com/users/mrducks/repos","events_url":"https://api.github.com/users/mrducks/events{/privacy}","received_events_url":"https://api.github.com/users/mrducks/received_events","type":"User","site_admin":false},"created_at":"2017-06-07T17:53:18Z","updated_at":"2017-06-07T17:53:18Z","body":"Were you able to make any progress on this issue?"}}
{"actor":{"display_login":"mrducks"}}