A regular expression and a Windows permission (cacls) question

Click For Summary
SUMMARY

The regular expression "\\+" matches the character "\" literally, while the "+" quantifier indicates one or more occurrences. For testing and learning regular expressions, various free online tools are available that support different flavors like PCRE and ECMAScript. The cacls command in Windows, used for modifying file permissions, lacks the ability to grant "modify" access. Instead, users should utilize the icacls command, introduced in Windows Server 2003 Service Pack 2, which includes comprehensive permission management features, including "modify" access.

PREREQUISITES
  • Understanding of regular expressions and their syntax
  • Familiarity with Windows command line utilities
  • Knowledge of file permission concepts in Windows
  • Experience with different versions of Windows, particularly Windows Server 2003 and later
NEXT STEPS
  • Explore online tools for testing regular expressions, such as Regex101 or RegExr
  • Learn about the icacls command and its syntax for managing file permissions
  • Study the differences between cacls, xcacls, and icacls commands
  • Investigate advanced regular expression patterns and their applications in programming
USEFUL FOR

Software developers, system administrators, and students working with Windows file permissions and regular expressions will benefit from this discussion.

Crosshash
Messages
50
Reaction score
0
Hello, firstly, what does the regular expression "\\+" do? Would that literally match up "\+". Could I possibly get some recommendations on some software to try regular expressions with as well actually please?

and secondly, I've been fiddling around with the cacls command and I've noticed that it doesn't seem to be able to give users "modify" access. It can

give read, write, change and full control to users but not modify (and I think some others too). How do you grant modify access to a file in the command line?

(this is for my coursework and I'm kind of stumped on these two questions).

Thanks guys.
 
Computer science news on Phys.org
Most likely, the question is about the regular expression without quotes. The regular expression \\+ matches the character \ literally. The + is the quantifier which matches between one and unlimited times.

In a different case - i.e. if we also include the quotes, the reg ex "\\+" matches the characters " and \ literally. For the character \ the expression uses the quantifier + which matches between one and unlimited times. It also matches the character " in the end.

Nowadays, with a simple google search, we can find a number of free online software applications for regular expressions of various flavors (PCRE, ECMAScript etc.) which help in learning about, testing, debugging, generate code etc.

The cacls command, which is an abbreviation for change access control lists, is a command line utility for displaying and modifying the security descriptors on folders and files. An access control list is a list of permissions for the object (file or folder) at hand. cacls has had a long history with the Windows operating system. Quoting from docs.microsoft.com : "The original cacls shipped with Windows NT 4.0 and enabled a set of basic capabilities for changing permissions at the command line but was limited in what it could accomplish. To resolve these limitations, Microsoft subsequently released an expanded xcacls in the Windows NT Resource Kit. Later yet, an unsupported xcacls.vbs was released that went further with capability but backward in terms of performance. ". Microsoft subsequently released - 2007 as initial release, icacls as cacls replacement, which is a full-featured version from Windows Server 2003 Service Pack 2 on and includes among others the modify capability, not present in the cacls command.
 

Similar threads

Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
29
Views
5K
  • · Replies 23 ·
Replies
23
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
1
Views
2K
Replies
2
Views
6K
  • · Replies 1 ·
Replies
1
Views
8K
  • · Replies 2 ·
Replies
2
Views
2K