Showing posts with label file. Show all posts
Showing posts with label file. Show all posts

Tuesday, August 3, 2021

Linux - SetUID - SetGID - Stick Bit - Special File Permissions

setgid Creates a file using owner rather than user creating it

setuid sets the permission of execution

sticky bits - Accidental Delete Protection Bit

https://www.cbtnuggets.com/blog/technology/system-admin/linux-file-permissions-understanding-setuid-setgid-and-the-sticky-bit   [IMP]

https://geek-university.com/linux/uid-user-identifier-gid-group-identifier/


Setting the setuid bit
To set the setuid bit symbolically, we can use chmod u+s </path/to/the/file>.
To set the setuid bit using octal representation we can add "4" to the front of our standard octal permissions


Setting the setgid bit
To set the setuid bit symbolically, we can use chmod g+s </path/to/the/file>.
To set the setgid bit using octal representation we can add "2" to the front of our standard octal permissions


Setting the sticky bit
We can set the sticky bit on directories symbolically with chmod +t :
Or using octal values and putting "1" in front of our standard permissions:

Saturday, January 30, 2021

URI - Filepath vs Spring Filepath Convention

 file:///C:/Path

https://en.wikipedia.org/wiki/File_URI_scheme

https://www.marcobehler.com/guides/java-files

Format[edit]

A file URI takes the form of

file://host/path

where host is the fully qualified domain name of the system on which the path is accessible, and path is a hierarchical directory path of the form directory/directory/.../name. If host is omitted, it is taken to be "localhost", the machine from which the URL is being interpreted. Note that when omitting host, the slash is not omitted (while "file:///foo.txt" is valid, "file://foo.txt" is not, although some interpreters manage to handle the latter).

RFC 3986 includes additional information about the treatment of ".." and "." segments in URIs.

How many slashes?[edit]

  • The // after the file: denotes that either a hostname or the literal term localhost will follow,[2] although this part may be omitted entirely, or may contain an empty hostname.[3]
  • The single slash between host and path denotes the start of the local-path part of the URI and must be present.[4]
  • A valid file URI must therefore begin with either file:/pathfile:///path or file://hostname/path.
  • file://path (i.e. two slashes, without a hostname) is never correct, but is often used.
  • Further slashes in path separate directory names in a hierarchical system of directories and subdirectories. In this usage, the slash is a general, system-independent way of separating the parts, and in a particular host system it might be used as such in any pathname (as in Unix systems).

Spring Filepath just has prefix "file:"
  • -DjunkCharCleanup="file:C:/Users/703250313/Desktop/ExternalConfig/junk-char-cleanup"
URI Filepath
  • -DsamlMetaDataFilepath="file:///C:/Users/703250313/Desktop/ExternalConfig/metadata.xml"

Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass