is there a dos equivalent of the unix command chmod?
is there a dos equivalent of the unix command chmod?
Not really. What do you want to do to the files?
I don't think DOS supported file permissions, but if you are actually referring to Windows, you could try the cacls command.
Give users certain rights, perhapsWhat do you want to do to the files?
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
CuteOriginally Posted by Magos
If he wants to make the file Read Only, then that's easy. If he wants to stop execution, then that's not so simple
I just love all this sepculation
anyhow...
My goal is thus
in unix, the chmod has the flag -f
or force mode, so that I can, in an account with not so many privaliges, force a document to give me read or write privaliges.
my goal is to be able to, in a windows account, probably with status below "power user", five myself read and write privaliges over certain files
can it be done? does it even need to be done?
-f in chmod doesn't force a document to give you read or write privileges. All -f does is suppress error messages.
If the user account doesn't have admin privileges, you cant give yourself access to files which you would not otherwise have access to.
is there anyway to change account status through dos?
Use the LogonUser() API function.
You say "in a windows account" then talk about DOS. Are you working with 32 bit Windows, (no DOS involved), or DOS - it really does make a vrey big difference.
You can create Access Control Lists for resources under WIndows which grant or deny access to specific resources to members of specific groups. It is a big area.
Apart from some noddy tricks, you can't do that with DOS.
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
Assuming you are using Windows, you could check out the Non-Admin blog, especially the MakeMeAdmin entry.
another dos question:
how do I write an autorun.bat that gets started up when I pop in a CD (the .bat is on the CD)?