permissions – Make SharePoint List Item accessible to users with links only

I assume you are using SharePoint Online. Please let me know if you are in a different environment.

For only allowing users to access list item via direct links, I will suggest you to give no permission level for these users in list level, and only provide them with a sharing link to the specific list item. They can use the link to access the list item however they have no permission to see other items.

Basic idea of SharePoint Permissions:

https://docs.microsoft.com/en-us/sharepoint/understanding-permission-levels

https://docs.microsoft.com/en-us/sharepoint/modern-experience-sharing-permissions

Customize Permissions for a list:

https://support.microsoft.com/en-us/office/customize-permissions-for-a-sharepoint-list-or-library-02d770f3-59eb-4910-a608-5f84cc297782

How to share a file or folder:

https://support.microsoft.com/en-us/office/share-sharepoint-files-or-folders-1fe37332-0f9a-4719-970e-d2578da4941c

nmap – How to check the udp port is accessible in an Ubuntu machine which is protected by a firewall

We were trying to install “Big blue button” in an Ubuntu server with a firewall. For installation, we need these UDP ports (“16384-32768”) should be opened in the firewall. But we don’t know whether the udp ports are opened or not in the firewall. When we tried the “netcat” service, we were able to communicate. But while doing “nmap” scanning, it has been showing these UDP ports in the state as “closed”

nmap command used as :

 nmap -sS -sU -PN -p 16384 EXTERNAL_IP ( For single port )

Output :

   Host is up (0.039s latency).

   PORT      STATE    SERVICE
  16384/tcp filtered connected
  16384/udp closed   connected

react.js – Accessible React combobox

To learn React I’ve ported a Vue combobox component into React. Because of the project it could be used in uses React 16.2 it doesn’t use features like React.createRef() or hooks.

import React, { Component } from 'react'
import PropTypes from 'prop-types'

class ComboBox extends Component {
  constructor (props) {
    super(props)

    this.state = {
      active: 0,
      shown: false,
      value: props.value
    }

    this.root = null
    this.textbox = null
    this.options = new Array(props.items.length)

    this.setRootRef = element => this.root = element
    this.setTextboxRef = element => this.textbox = element
    this.setOptionsRef = (index, element) => this.options(index) = element

    this.listenForClickOut = this.listenForClickOut.bind(this)
    this.handleChange = this.handleChange.bind(this)
    this.handleClick = this.handleClick.bind(this)
    this.handleTextboxKeypress = this.handleTextboxKeypress.bind(this)
    this.handleListboxKeypress = this.handleListboxKeypress.bind(this)
    this.handleRootKeydown = this.handleRootKeydown.bind(this)
  }

  get items () {
    return this.props.items
  }

  componentDidMount () {
    window.addEventListener('click', this.listenForClickOut)
  }

  componentWillUnmount () {
    window.removeEventListener('click', this.listenForClickOut)
  }

  /* Event handlers */

  listenForClickOut (click) {
    if (!this.root.contains(click.target)) {
      this.hide()
    }
  }

  handleChange (event) {
    this.setState({
      value: event.target.value,
    })
  }

  handleTextboxKeypress (event) {
    switch (event.key) {
      case 'ArrowDown':
        this.open()
        break
    }
  }

  async handleListboxKeypress (event) {
    switch (event.key) {
      case 'ArrowUp':
        await this.up()
        break
      case 'ArrowDown':
        await this.next()
        this.focusOption()
        break
    }
  }

  handleRootKeydown (event) {
    switch (event.key) {
      case 'Tab':
      case 'Escape':
        this.close()
        break
    }
  }

  handleClick (i) {
    this.props.onSelect(this.items(i))
    this.close()
  }

  /* Position methods */

  first () {
    this.setState({
      active: 0
    })
  }

  previous () {
    return new Promise(resolve => {
      const previous = this.state.active - 1
      if (previous >= 0) {
        this.setState({
          active: previous
        }, resolve)
      }
    })
  }

  next () {
    return new Promise(resolve => {
      const max = this.items.length - 1
      const next = this.state.active + 1
      if (next <= max) {
        this.setState({
          active: next
        }, resolve)
      }
    })
  }

  /* List control methods */

  async open () {
    if (this.items.length === 0) {
      return
    }
    this.first()
    await this.show()
    this.focusOption()
  }

  close () {
    this.hide()
    this.focusTextbox()
  }

  show () {
    return new Promise(resolve => {
      this.setState({
        shown: true
      }, resolve)
    })
  }

  hide () {
    this.setState({
      shown: false
    })
  }

  async up () {
    if (this.state.active === 0) {
      this.close()
      return
    }

    await this.previous()
    this.focusOption()
  }

  async down () {
    await this.next()
    this.focusOption()
  }

  focusTextbox () {
    this.textbox.focus()
  }

  focusOption () {
    const index = this.state.active
    this.options(index).focus()
  }

  render () {
    const { items } = this.props
    const { active, shown, value } = this.state

    return (
      <div ref={this.setRootRef} onKeyDown={this.handleRootKeydown}>
        <input
          aria-autocomplete="list"
          aria-expanded={shown}
          autoComplete="off"
          autoCapitalize="none"
          className="form-control"
          ref={this.setTextboxRef}
          role="combobox"
          value={value}
          onChange={this.handleChange}
          onKeyDown={this.handleTextboxKeypress}
        />
        {shown &&
        <div className="list-group" role="listbox" onKeyDown={this.handleListboxKeypress}>
          {items.map((item, i) => (
            <button
              aria-selected={active === i}
              className={`list-group-item list-group-item-action py-1 ${active === i ? 'active' : ''}`}
              key={i}
              ref={element => this.setOptionsRef(i, element)}
              role="option"
              tabIndex="-1"
              onClick={() => this.handleClick(i)}
            >
              {item}
            </button>
          ))}
        </div>
        }
        <div aria-live="polite" role="status" className="sr-only">{items.length} results available.</div>
      </div>
    )
  }
}

ComboBox.propTypes = {
  items: PropTypes.array,
  value: PropTypes.string,
  onSelect: PropTypes.func,
}
ComboBox.defaultProps = {
  items: (),
  value: '',
  onSelect: () => ({})
}

export default ComboBox

Demo on codepen

How to host a site using apache2 on Ubuntu 20.04 with ip_adress/phpmyadmin accessible

I have a VPS setup with Ubuntu 20.04 and LAMP installed. I could access phpmyadmin then via <ip_address>/phpmyadmin.

Later I enabled a virtualhost at /etc/apache2/sites-available/ by adding .conf file, I can access the site I enabled via <ip_address>

But <ip_address>/phpmyadmin now gives a 404. As I understand this is because all the requests are directed to my enabled site. Since I want to access both phpmyadmin and mysite as well, I tried few combinations of changes to .conf file as suggested from search results I got from Google. But none of them worked. Three of the tried configurations are as follow.

Adding an alias

<VirtualHost *:80>
    ServerAdmin john@ubuntu

    ErrorLog ${APACHE_LOG_DIR}/cpapp-error.log
    CustomLog ${APACHE_LOG_DIR}/cpapp-access.log combined

    Alias /phpmyadmin /usr/share/phpmyadmin
    <Directory /usr/share/phpmyadmin>
    Options FollowSymLinks
    DirectoryIndex index.php
   </Directory>

    <Location />
            ProxyPass unix:/home/john/cpapp/cpapp.sock|http://127.0.0.1/
            ProxyPassReverse unix:/home/john/cpapp/cpapp.sock|http://127.0.0.1/
    </Location>
</VirtualHost>

Creating two virtual hosts

<VirtualHost *:80>
    ServerAdmin john@ubuntu

    ErrorLog ${APACHE_LOG_DIR}/cpapp-error.log
    CustomLog ${APACHE_LOG_DIR}/cpapp-access.log combined

    <Location />
            ProxyPass unix:/home/john/cpapp/cpapp.sock|http://127.0.0.1/
            ProxyPassReverse unix:/home/john/cpapp/cpapp.sock|http://127.0.0.1/
    </Location>
</VirtualHost>
<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Limiting my Site to a specific URL path – this gave an syntax error of .conf when reloading apache2

<VirtualHost *:80>
    ServerAdmin john@ubuntu

    ErrorLog ${APACHE_LOG_DIR}/cpapp-error.log
    CustomLog ${APACHE_LOG_DIR}/cpapp-access.log combined

    <Location />
            ProxyPass /mysite/ unix:/home/john/cpapp/cpapp.sock|http://127.0.0.1/
            ProxyPassReverse /mysite/ unix:/home/john/cpapp/cpapp.sock|http://127.0.0.1/
    </Location>
    DocumentRoot /var/www/html
</VirtualHost>

Can somebody please point me what have tried wrong?

8 – Site’s home page is “Temporarily Unavailable”, but rest of pages are accessible

One of our sites’ homepage is displaying the generic “Temporarily Unavailable” 503 status message.
Just the homepage is affected, when I log in via Acquia Cloud Site Factory, I can access the other pages.
I’ve enabled the dblog module and this is the error message it produced:

DrupalComponentPluginExceptionMissingValueContextException: Required contexts without a value: view_mode in DrupalCorePluginContextContextHandler->applyContextMapping() (line 155 of /mnt/www/html/ucr01live/docroot/core/lib/Drupal/Core/Plugin/Context/ContextHandler.php).

This was discovered just this morning. Over the weekend, we updated our sites to Drupal Core 8.8.4 (updated form Drupal core 8.7.9) and Acquia Lightning 4.1.3. All our other sites are working fine. We’re still on PHP 7.2, though, but we’re not sure if this issue will be fixed if we upgrade to PHP 7.3.

remote access – How can I host my website myself on my local machine and make it accessible to everyone on the globe?

I wish to host my website myself on my machine but I don’t know how to do it. Also, I have set up Apache2 Virtual host on my Ubuntu 19.10 but nobody else can access the site except my local machine, so please how can I make it accessible to everyone?

photos – Map with all accessible geo-tagged images?

I would like to browse all available geo-tagged images on a map. There are Google Maps, Google Earth, Flickr Map, etc. but all of them are displaying only images uploaded to the particular service.

Is there a service crawling the internet for geo-tagged images and displaying them on a map?

There shouldn’t be a legal obstacle creating this, e.g. Google Images are displaying images from various sources.

domain name system – How do I add hostnames to nginx so they are externally accessible?

Let’s say I have a domain name example.com and want to add a site, like admin.example.com. In nginx I can then set server_name in the configuration of this site to admin.example.com. However, if I try to access the site, it cannot find the IP address.

Do I need to add this to the DNS record itself? Isn’t it possible to make the server itself the DNS server, or to just point all the hostname/subdomains (not sure what the right term is, but the * part in *.example.com) to the servers’ IP in the original DNS record? If I want to add another hostname like admin2.example.com I don’t want to edit the DNS record again.

I’m sure I’m missing something obvious here. I also can’t find any tutorial on this, which I find weird, as it should be something which is rather common.

secure boot – Is secureboot of any use if I keep my private key in a root accessible file?

According to the Debian wiki on SecureBoot,

This removes the risk of userland malware potentially enrolling new keys and therefore bypassing the entire point of SB.

So SecureBoot stops users from installing keys without UEFI confirmation (outside of the OS) and verification with a passcode. That makes sense.

However, nothing there ever says to remove the key so root doesn’t have access to it. Does SecureBoot serve any purpose if I keep my private key in a root-accessible file?

Expose the ubuntu 18.04 server to a monitoring solution accessible from the web

I have a VPS server and I have installed a mongodb database and a java application on another server. I would like a system that can be remotely accessed through a public IP that tells me how memory is being used and also sees the logs.

I don't want anything invasive or very heavy. I have watched webmin and it is a bit of a kill. If possible I am looking for a lightweight agent that I can install on my server and be able to monitor online.

What would you recommend for that?

Again, the tool should be light.