Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums

Go Back   Code Forums > Systems > Windows

Reply
 
LinkBack Thread Tools Display Modes
Old 11-17-2005, 09:58 AM   #1 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
programatically set windows dir perms

anyone know how to set a directory to read/execute programatically either from a batch file or .NET ?

i'm trying to setup an IIS directory, but the internet user needs to be able to read/execute that directory. i think it's going to be too difficult to find the actual IIS user between different machines, .. but if i can set the 'Everyone' user to read/execute, that would probably do the trick.
sde is offline   Reply With Quote
Old 02-28-2006, 09:10 AM   #2 (permalink)
AssKoala
Anti-Zealot
 
AssKoala's Avatar
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 72
AssKoala is on a distinguished road
Send a message via AIM to AssKoala Send a message via MSN to AssKoala Send a message via Yahoo to AssKoala
http://www.ss64.com/nt/

Google search

I apologize as well, I didn't notice that this was from 2005 since it was at the top of the forum. Regardless, there's the answer. You can do anything and everything in the cmdline in Windows that a GUI does (as of Server 2003 or 2000 Server, iirc).
__________________
If you always think like an expert, you'll always be a beginner. | "A handful of knowledgeable people is more effective than an army of fools" -Writing Secure Code, 2nd Ed.
AssKoala is offline   Reply With Quote
Old 02-28-2006, 09:23 AM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
ok, so something like this
Code:
CACLS C:\some_directory /E /G "IUSR_MYBOX":R
in the security tab of the gui, there is an option for read/execute, which is what i need for a php directory. in the first link, i don't see a permission for execute.

thanks. now i can modify the utility to do this instead of having extra instructions in the readme.
sde is offline   Reply With Quote
Old 02-28-2006, 09:35 AM   #4 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
awsome, i just tested it and the R does set a directory to read/exec.

Code:
CALCS C:\some_directory /E /G "IUSR_%COMPUTERNAME%:R
if a user ever changes their system name, the IUSR will be different, but oh well. better than nothing.

thanks again.
sde is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenGL.dll Mr.Anderson Platform/API C++ 3 08-13-2004 10:07 AM
what language is this? sde All Other Coding Languages 10 05-25-2004 03:57 PM


All times are GMT -8. The time now is 09:05 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting