Home > Software engineering >  How to use the API to get all documents specified directory permissions on the server
How to use the API to get all documents specified directory permissions on the server

Time:10-02

Every directory of the file server assigned to different people, speaking, reading and writing, such as file servers "d: \ \ 3 a 123" directory is specified for reading and writing, all people can read, mapped to the client machine for x: \ "aaa", I need to run a program on the client side, which API call can get x: \ 3 a the directory permissions to all of the name,

CodePudding user response:

Like AD programming, specific forget, little information, used to do LAN domain login to check some information,

CodePudding user response:

Call command line cacls command
For example,
Cacls filename Shell "CMD/c & gt; D: \ out. TXT ", vbHide
'then read file d: \ out. TXT content, can know the information such as the permissions filename,

CodePudding user response:

With cacls command doesn't work, can check this site, check the mapping file directory on the server can not get the result,

CodePudding user response:

C: \ & gt; Net help share
This command syntax is:


NET SHARE
Sharename
Sharename=drive: the path [/GRANT: user, [READ | CHANGE | FULL]]
[/USERS: number |/UNLIMITED]
[/CACHE: Manual | Documents | designed | None]
Sharename [/USERS: number |/UNLIMITED]
[/REMARK: "text"]
[/CACHE: Manual | Documents | designed | None]
{sharename | devicename | drive: the path}/DELETE

NET SHARE network resources, users can use a server when using this command with no options
, it will list all resources are Shared on the computer, for each kind of resources, the Windows are
Will report the device name or path name, and associated descriptive annotation,

Sharename refers to a Shared resource network name, enter NET SHARE and a SHARE name will only
According to the Shared information about
Drive: the path specifies the directory in which the will be Shared by the absolute path,
/GRANT: user, perm, creating a security descriptor share permissions granted to specify users requirement,
This option can be used multiple times and gives share permissions to multiple users,
/USERS: number can set the maximum number of USERS access to a Shared resource at the same time,
/UNLIMITED specified number of users can access to a Shared resource at the same time not restricted,
/REMARK: "text" to add a descriptive comment about resources, the text should be included in the quotation marks,
Devicename refers to one or more Shared by Shared name printer (LPT1: to LPT9:),
According to the share name sharing,
/DELETE stop sharing resources,
/CACHE: Manual of procedures and documents from this share to enable client CACHE manually
/CACHE: the Documents to enable automatic CACHE of Documents from this share
/CACHE: designed for procedures and documents from this share enable automatic CACHE
/CACHE: None disable this Shared CACHE

NET HELP command | MORE displays HELP for each screen,
  •  Tags:  
  • API
  • Related