Adding IIS_USRS Permissions to Multiple Directories via Command Line
Hi I am not too proficient with the use of command line, but I have to frequently add the same permissions settings to multiple folders which can be tedious and take extra time.
I was wondering if it is possible to do all these with some sort of script or bat via command line.
C:\MyRootDirectory C:\MyRootDirectory\ParentFolder1 C:\MyRootDirectory\ParentFolder2 C:\MyRootDirectory\ParentFolder2\ChilderFolder1 C:\MyRootDirectory\ParentFolder3
If I wanted to add IIS_USRS with "Modify" permissions to ParentFolder1, ChildFolder1, and ParentFolder3 all in one command line execution and/or script, how would I go about doing that?
Thanks ahead of time!
See also questions close to this topic
how to list all the DLLs ever loaded by a process even those that were loaded and unloaded before I started monitoring the process
I have a requirement to find out all the DLLs that a process ever loaded including those that have been unloaded at the time I monitor it. I know there are many tools for this eg listdlls but they only tell the currently loaded ones - not those that have been unloaded before I started monitoring it.
What I'd like is a comprehensive list of DLLs that have been loaded and unloaded upto the point of monitoring.
Read a file that has a HEX value and convert it to INT64 (c++)
I'm wanting to read a text document that has a hex value (0x1B5A0C41390) and store it as an INT64 or DWORD64 which is 1879597912976. I've tried reading the file and storing it as a string but I'm not sure where to go from there.
Multiple XAudio2 instances needed for AUDIO_STREAM_CATEGORY?
In the newer XAudio2 API's for Windows 8 and 10, an
AUDIO_STREAM_CATEGORYis passed to
The documentation goes on to say how these should be used for different types of audio. However an
IXAudio2is only allowed one master voice. To do this is completely separate
IXAudio2instances along with all associated interfaces required, or can categories be specified elsewhere in the audio graph by some means?
Games should categorize their music streams as AudioCategory_GameMedia so that game music mutes automatically if another application plays music in the background. Music or video applications should categorize their streams as AudioCategory_Media or AudioCategory_Movie so they will take priority over AudioCategory_GameMedia streams. Game audio for in-game cinematics or cutscenes, when the audio is premixed or for creative reasons should take priority over background audio, should also be categorized as Media or Movie.
Norton Security logs
In Program Files/Norton Security/Engine/VERSION I found MCUI32.exe file which exports logs to a file, but what are its options to run from cmd?
I found only "/export path" and "/category number". "/export path" works, the file with logs is created by MCUI32.exe, but "/category number" doesn't. Different values of number give the same result - full log file. But I'd like to get only recent logs or logs which were created after some date.
Can I run programs to decide my copts and linkopts flags?
I'm writing a BUILD rule for the imgui library.
Based on what I've been able to derive from their makefiles, a compile command looks like this:
g++ -o sdl_opengl3_example *.o `sdl2-config --cflags` -lGL -ldl `sdl2-config --libs`
I've run the the sdl2-config program manually to get the additional flags:
sdl2-config --cflags -I/usr/include/SDL2 -D_REENTRANT sdl2-config --libs -L/usr/lib/x86_64-linux-gnu -lSDL2
Now that I've created a working BUILD rule,
I'm left wondering if I should incorporate the call to
stl2-configback into the rule.
Is is possible to derive the copts and linkopts value by running a program?
I haven't been able to do it while populating values to
Take the output of type list as input parameter of a function in Linux command line
I am a beginner of Linux command line and trying to get myself familiar with that so please pardon me.
I now have two functions. One function, say
list.py, will generate a list (e.g. [1, 2, 3, 4, 5]) and another function, say
max_list.py, will take the list as input parameter and return the largest value of the input list.
I now want to use the output of a function as the input of another function in Linux command line. I have found two similar questions here Linux command output as a parameter of another command and How to pass an entire list as command line argument in Python?. Right now my approach is
python max_list.py $(python list.py)However, seems like that the list is output as
1 2 3 4 5do that the whole command line becomes
python max_list.py 1 2 3 4 5, however, what I want is
python max_list.py <a list of [1,2,3,4,5]>. So the command line takes 1 as input list and everything comes after 1 would become unrecognized parameter.
Could someone tell me what's the problem in my code and how could I fix that? Many thanks!
User Group permission for apache website
Apache is running with
I added a user
sudo useradd -s /bin/false -d /var/www/dev -m dev
and added to
sudo usermod -G www-data --append dev uid=1001(dev) gid=1001(dev) groups=1001(dev),33(www-data)
Now when a website running from
/var/www/dev, it is getting permission denied error when trying to write something like logs,cache.
All files and folder at
dev:dev. Not using Suexec.
But if I am changing group to
dev:www-datait is working fine.
How I can get write permission for apache with
How do I filter "file mode only" changes from the git diff output?
I have the same file on two branches (
foo.c). On both branches, the content of the file is exactly the same, however, the file mode is
100644on one branch and
100755on the other.
git diff some-branch.. -- foo.c
old mode 100644 new mode 100755
git diff --numstat some-branch..
0 0 foo.c 138 128 bar.c
How do I filter "file mode only" changes from the diff output? (foo.c in this case)
Is it possible with out rewriting the history?
Note: I have tried setting
core.filemode, as described in several similar questions, but I didn't managed to get rid of the mode only changes in the diff output. In both of the following commands the output is the same:
git -c core.filemode=true diff --summary some-branch.. -- foo.c git -c core.filemode=false diff --summary some-branch.. -- foo.c
mode change 100644 => 100755 foo.c
I am using the git bash on Windows. (I guess the issue was introduced by a co-developer using cygwin.)
how to change user (www-data) to root
I do not know what happens...but in my laptop, all folders and files have user www-data instead of root.
in directory /desktop /music ....alll directories ..
how can I change user root?
I use command
chown -R www-data:root / chown -R root:www-data /
any ideas?? I tried a lot but I am not able to change the user for files and directories.
even I tried lots of commands but I do not know how can I change user as root