|
Answer» Hi! I was wondering, is ther any way I can set the sharing attibutes of a folder using MS-DOS commands and assign ACCESS permissions to it?you can change or give folder / file permissions to a group or a user with:
cacls xcacls [rk]
(Only for NTFS partitions) A bit cryptic but possible.
hope this helps uliCan you clearly explain this to me? As far as I know, CACLS works only for files not folders. Can you give me a sample syntax? Will it be possible assigning folder permissions from a remote computer? To be specific, I wanted to assign permissions on a folder named test from another computer, is it possible?cacls folder /E /G "Username or group":R
will change or set the permissions for the user / group in read.
/E Edits ACLs instead of replacing them /T Processes files in the current directory and all subdirectories /C Continues on access denied errors /R user Revokes specified user access RIGHTS
Rights:
R Read access C Change (write) access F Full control P Change permissions (special access) X Execute (special access) O Take ownership (special access) E read (special access) W Write (special access) D Delete (special access)
It should be possible to set rights on remote pcs if you MAP a drive.
Please be careful and let us know how it goes. I am not courios, just interested.
hope this helps uli Thanks for the tip. But I'm afraid that mapping drives isn't really my plan. The reson why I really wanted to know about folders and stuff is because I'd be using it in my VB application...
1. A user interacts with my application. 2. A folder will be automatically created on the server (MKDIR UNC Path). 3. Then assign permission that the owner and a few other people have permission to access it.
It's a Document Archiving Software by the way if your curious about it. I don't want them to be doing the whole document archiving process 'coz I'm trying to avoid catastrophes that might occur from their uncanny mistakes...I need to find MS-DOS for download..Thats possible. If you can create a folder on a server you can also set the rights of this folder. This shouldn´t be a real problem.
I can't help you with VB sorry.
uliI'm not askin' for help in VB. I just wantted to know how to share a folder once it's created and set permissions to it after being created and shared. Please help...Ok, I will post an example on monday. (I don´t have a Nt machine at home and am afraid to post something wrong.) Which permissions do you want to give the users? read write execute?
uliI want to give some users full control whilst others complete access denial. But take not however that I'm planning to do this remotely if possible... Thanks in advance for helping me out...On this site are a few EXAMPLES which should cover your needs:
http://www.ss64.com/nt/cacls.html
In generell it is better to give groups the rights they need and don't give groups the rights they don't need. Give single users specified rights if you cannot solve it with groups. To denie users complete access is critical. Try to avoid this method. (Never denie a group complete access to a folder. If you are also in this group, you have lost. You don't have a CHANCE to get access!)
hope this helps uli
Thanks for the help dude! It works like a charm. Again thanks a lot!
|