Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use

cmd# dir uuid.vbs /q /s
15.08.2011  16:52                83 HOST\user           uuid.vbs

but this not work for Windows shares which mounted by:

cmd# net use t: \\\distr

It take output like:

cmd# dir wget.later /q /s
15.08.2011  09:16                66 ...                 wget.later

Also when in Explorer check Properties ==> Security you can see list of users/groups that have some permition for this file.

How can I list owner or users/groups which have permition on file from command line? May be VB/JS-scrips allow this (as come starting from Win2000)?

share|improve this question

Use cacls filename. It will give the access information of the file.

share|improve this answer
For shares it writes that domain not found for some ... users. With Properties ==> Security you can see list of users/groups that have some permition for this file. – gavenkoa Aug 15 '11 at 15:07
I echo @gavenkoa, cacls (and icacls) doesn't reliably report owner on network shares. As near as I can tell from the machines I have access to: a) On Windows Server 2003 cacls says Everyone:F, dir /q says BUILTIN\Administrators and Windows Explorer says Administrators (SERVERNAME\Administrators); b) on a samba server (a QNAP NAS device) cacls reports ``<Account Domain not found>F, dir /q says either ... or DOMAIN\username for different files (haven't figured out why/how), and Windows Explorer says Username (SERVERNAME\username or Full.Name ( – matt wilkie Jan 18 '13 at 19:17

I'm guessing that your machine is not part of a domain and you are trying to list security permissions for a network share that is.

My machine at work is not part of the domain and dir /q will not list ownership correctly for files in a network share. File owners show up as "...". I solved this problem by remote desktop to a machine that is part of the domain and then running a cmd from there.

You can also start a remote cmd shell using psexec \\server cmd.

share|improve this answer
Thanks for interest to question. +1 – gavenkoa Nov 19 '13 at 6:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .